1 | <?php |
||
7 | class Component |
||
8 | { |
||
9 | private $page; |
||
10 | private $head = false; // or true |
||
11 | private $foot = false; // or true |
||
12 | private $body = false; // or true |
||
13 | private $cell = ''; // or a closing </th> or </td> tag |
||
14 | private $vars = array(); // to include in every cell |
||
15 | |||
16 | 2 | public function __construct() |
|
20 | |||
21 | 2 | public function open($vars = '', $caption = '') |
|
29 | |||
30 | 1 | public function head($vars = '', $cells = '') |
|
31 | { |
||
32 | 1 | $html = $this->wrapUp('head')."\n\t"; |
|
33 | 1 | $this->head = true; |
|
34 | 1 | $this->vars = (!empty($cells)) ? $this->values($cells) : array(); |
|
35 | |||
36 | 1 | return $html.$this->page->tag('tr', $this->values($vars)); |
|
37 | } |
||
38 | |||
39 | 1 | public function foot($vars = '', $cells = '') |
|
40 | { |
||
41 | 1 | $html = $this->wrapUp('foot')."\n\t"; |
|
42 | 1 | $this->foot = true; |
|
43 | 1 | $this->vars = (!empty($cells)) ? $this->values($cells) : array(); |
|
44 | |||
45 | 1 | return $html.$this->page->tag('tr', $this->values($vars)); |
|
46 | } |
||
47 | |||
48 | 1 | public function row($vars = '', $cells = '') |
|
49 | { |
||
50 | 1 | $html = $this->wrapUp('row')."\n\t"; |
|
51 | 1 | $this->body = true; |
|
52 | 1 | $this->vars = (!empty($cells)) ? $this->values($cells) : array(); |
|
53 | |||
54 | 1 | return $html.$this->page->tag('tr', $this->values($vars)); |
|
55 | } |
||
56 | |||
57 | 1 | public function cell($vars = '', $content = '') |
|
69 | |||
70 | 1 | public function close() |
|
81 | |||
82 | 2 | protected function values($vars) |
|
97 | |||
98 | 1 | private function wrapUp($section) |
|
99 | { |
||
100 | 1 | $html = $this->cell; |
|
158 | } |
||
159 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..