1 | <?php |
||
25 | class ConsoleTableWriter implements WriterInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var Table |
||
29 | */ |
||
30 | protected $table; |
||
31 | |||
32 | /** |
||
33 | * @var string[]|null |
||
34 | */ |
||
35 | protected $header; |
||
36 | |||
37 | /** |
||
38 | * @var bool |
||
39 | */ |
||
40 | protected $autoDetectHeader = false; |
||
41 | |||
42 | /** |
||
43 | * @param Table $table |
||
44 | * |
||
45 | * @codeCoverageIgnore |
||
46 | */ |
||
47 | public function __construct(Table $table) |
||
51 | |||
52 | /** |
||
53 | * @param string[] $header |
||
54 | * |
||
55 | * @return ConsoleTableWriter |
||
56 | */ |
||
57 | 1 | public function setHeader(array $header) |
|
63 | |||
64 | /** |
||
65 | * @param bool $autoDetectHeader |
||
66 | * |
||
67 | * @return ConsoleTableWriter |
||
68 | */ |
||
69 | 1 | public function autoDetectHeader($autoDetectHeader = true) |
|
75 | |||
76 | /** |
||
77 | * Write the given item. |
||
78 | * |
||
79 | * @param mixed $item |
||
80 | */ |
||
81 | 5 | public function writeItem($item) |
|
91 | |||
92 | /** |
||
93 | * Prepare the writer. |
||
94 | * |
||
95 | * |
||
96 | * @codeCoverageIgnore |
||
97 | */ |
||
98 | public function prepare() |
||
104 | |||
105 | /** |
||
106 | * Finish the writer. |
||
107 | */ |
||
108 | 1 | public function finish() |
|
112 | |||
113 | /** |
||
114 | * @param mixed $item |
||
115 | */ |
||
116 | 2 | protected function handleAutoDetectHeader($item) |
|
127 | |||
128 | /** |
||
129 | * @param mixed $item |
||
130 | * |
||
131 | * @return string[] |
||
132 | */ |
||
133 | 4 | protected function getKeys($item) |
|
147 | |||
148 | /** |
||
149 | * @param mixed $item |
||
150 | * @param string[] $keys |
||
151 | * |
||
152 | * @return array |
||
153 | */ |
||
154 | 3 | protected function getValues($item, array $keys) |
|
163 | } |
||
164 |
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..