| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | protected function execute(InputInterface $input, OutputInterface $output): int |
||
| 18 | { |
||
| 19 | $this->initConfiguration($input->getOption('configFile')); |
||
| 20 | |||
| 21 | $lastRun = time() - 7200; |
||
| 22 | |||
| 23 | $remoteConnect = new RemoteConnect( |
||
| 24 | $this->config->getInventorioServer(), |
||
| 25 | $this->getServerId(), |
||
| 26 | $this->config->getCommands() |
||
| 27 | ); |
||
| 28 | |||
| 29 | while (true) { |
||
| 30 | if ($lastRun < time() - 3600) { |
||
| 31 | $command = $this->getApplication()->find('collect'); |
||
| 32 | $command->run($input, $output); |
||
| 33 | $lastRun = time(); |
||
| 34 | } |
||
| 35 | |||
| 36 | $remoteConnect->run(); |
||
| 37 | |||
| 38 | sleep(10); |
||
| 39 | } |
||
| 42 |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: