These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /** |
||
4 | * This file is part of the ApiGen (http://apigen.org) |
||
5 | * |
||
6 | * For the full copyright and license information, please view |
||
7 | * the file LICENSE that was distributed with this source code. |
||
8 | */ |
||
9 | |||
10 | namespace ApiGen\Console\Formatter; |
||
11 | |||
12 | use Symfony\Component\Console\Formatter\OutputFormatter as BaseOutputFormatter; |
||
13 | use Symfony\Component\Console\Formatter\OutputFormatterStyle; |
||
14 | |||
15 | class OutputFormatter extends BaseOutputFormatter |
||
16 | { |
||
17 | |||
18 | public function __construct() |
||
19 | { |
||
20 | parent::__construct(null, $this->getStyles()); |
||
0 ignored issues
–
show
|
|||
21 | } |
||
22 | |||
23 | |||
24 | /** |
||
25 | * @return array|OutputFormatterStyle[] |
||
26 | */ |
||
27 | private function getStyles() |
||
28 | { |
||
29 | return [ |
||
30 | 'warning' => new OutputFormatterStyle('black', 'yellow') |
||
31 | ]; |
||
32 | } |
||
33 | } |
||
34 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: