| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 9 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | View Code Duplication | public function run(InputInterface $input = null, OutputInterface $output = null) |
|
| 42 | { |
||
| 43 | $argv = $_SERVER['argv']; |
||
| 44 | $script = array_shift($argv); |
||
| 45 | array_unshift($argv, 'process'); |
||
| 46 | array_unshift($argv, $script); |
||
| 47 | |||
| 48 | return parent::run(new ArgvInput($argv), $output); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: