| Total Complexity | 6 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class SetPhpBinarySubscriber implements EventSubscriberInterface { |
||
| 12 | |||
| 13 | private function setPhpBinary(): void { |
||
| 14 | if(!isset($_ENV['PHP_BINARY'])) { |
||
| 15 | return; |
||
| 16 | } |
||
| 17 | |||
| 18 | $binary = $_ENV['PHP_BINARY']; |
||
| 19 | |||
| 20 | if($binary !== false) { |
||
| 21 | putenv('PHP_BINARY=' . $binary); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | |||
| 25 | public function onCommand(ConsoleCommandEvent $commandEvent): void { |
||
| 27 | } |
||
| 28 | |||
| 29 | public function onKernelRequest(RequestEvent $requestEvent): void { |
||
| 30 | $this->setPhpBinary(); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @inheritDoc |
||
| 35 | */ |
||
| 36 | public static function getSubscribedEvents(): array { |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.