Issues (4)

tools/bin/PropertyBuilderApp.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Remorhaz\UCD\Tool;
6
7
use Remorhaz\UCD\Tool\Console\BuildPropertiesCommand;
8
use Symfony\Component\Console\Application;
9
10
require_once __DIR__ . '/../../vendor/autoload.php';
11
12
$app = new Application("PHP UCD: Unicode Property Builder");
13
$buildCommand = new BuildPropertiesCommand();
14
$app->add($buildCommand);
15
$app->setDefaultCommand($buildCommand->getName());
0 ignored issues
show
It seems like $buildCommand->getName() can also be of type null; however, parameter $commandName of Symfony\Component\Consol...on::setDefaultCommand() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

15
$app->setDefaultCommand(/** @scrutinizer ignore-type */ $buildCommand->getName());
Loading history...
16
unset($buildCommand);
17
/** @noinspection PhpUnhandledExceptionInspection */
18
$app->run();
19