1 | <?php |
||
16 | class Console extends AbstractOutput implements OutputInterface |
||
17 | { |
||
18 | /** |
||
19 | * @codeCoverageIgnore impossible to test as writes to php://stdout |
||
20 | */ |
||
21 | public function render() |
||
25 | |||
26 | /** |
||
27 | * @param Benchmark $benchmark |
||
28 | * @param Table $table |
||
29 | * @param TableSeparator $tableSeparator |
||
30 | * @return string |
||
31 | */ |
||
32 | 1 | public static function output(Benchmark $benchmark, Table $table = null, TableSeparator $tableSeparator = null) |
|
40 | |||
41 | /** |
||
42 | * @param Table $table |
||
43 | * @param TableSeparator $tableSeparator |
||
44 | * @param array $rows |
||
45 | */ |
||
46 | 1 | protected static function loopRows(Table $table, TableSeparator $tableSeparator, array $rows) |
|
53 | |||
54 | /** |
||
55 | * @param Table $table |
||
56 | * @param array $metrics |
||
57 | * @param bool|string $name |
||
58 | * @return Table |
||
59 | */ |
||
60 | 1 | protected static function addRow(Table $table, array $metrics, $name) |
|
69 | } |
||
70 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: