| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class ConsoleRunner |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Runs console with the given helperset. |
||
| 19 | * |
||
| 20 | * @param Command[] $commands |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public static function run($commands = []) |
||
|
|
|||
| 25 | { |
||
| 26 | $cli = new Application('Warehouse Command Line Interface'); |
||
| 27 | |||
| 28 | $cli->setCatchExceptions(true); |
||
| 29 | |||
| 30 | self::addCommands($cli); |
||
| 31 | |||
| 32 | $cli->run(); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public static function addCommands(Application $cli) |
||
| 45 | ]); |
||
| 46 | } |
||
| 48 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.