GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( c517ee...c7ab7d )
by Jad
17:39
created

src/Console/Formatter/OutputFormatter.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

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
null is of type null, but the function expects a boolean.

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:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
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