| 1 | <?php  | 
            ||
| 11 | class ProcessCommand  | 
            ||
| 12 | { | 
            ||
| 13 | /**  | 
            ||
| 14 | * ProcessCommand constructor.  | 
            ||
| 15 | * @param $command  | 
            ||
| 16 | * @param $projectPath  | 
            ||
| 17 | * @param OutputInterface $output  | 
            ||
| 18 | */  | 
            ||
| 19 | public function __construct($command, $projectPath, OutputInterface $output)  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * @param $command  | 
            ||
| 26 | * @param $projectPath  | 
            ||
| 27 | * @param OutputInterface $output  | 
            ||
| 28 | */  | 
            ||
| 29 | protected function run($command, $projectPath, OutputInterface $output)  | 
            ||
| 37 | }  | 
            
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: