for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GGGGino\WarehousePath\Tools\Console;
use GGGGino\WarehousePath\Tools\Console\Command\GraphicalTestCommand;
use GGGGino\WarehousePath\Tools\Console\Command\MultiplePathGraphicalTestCommand;
use GGGGino\WarehousePath\Tools\Console\Command\PrintMatrixTestCommand;
use GGGGino\WarehousePath\Tools\Console\Command\ShortestPathGraphicalTestCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
/**
* Handles running the Console Tools inside Symfony Console context.
*/
class ConsoleRunner
{
* Runs console with the given helperset.
*
* @param Command[] $commands
* @return void
public static function run($commands = [])
$commands
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public static function run(/** @scrutinizer ignore-unused */ $commands = [])
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$cli = new Application('Warehouse Command Line Interface');
$cli->setCatchExceptions(true);
self::addCommands($cli);
$cli->run();
}
public static function addCommands(Application $cli)
$cli->addCommands([
new GraphicalTestCommand(),
new MultiplePathGraphicalTestCommand(),
new ShortestPathGraphicalTestCommand(),
new PrintMatrixTestCommand()
]);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.