| Conditions | 3 |
| Paths | 2 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 4 | public function execute(InputInterface $input, OutputInterface $output) : int |
|
| 22 | { |
||
| 23 | 4 | $cacheFilename = static::tempnamCheck(static::tempnam(), $output); |
|
| 24 | |||
| 25 | 4 | if ( ! is_string($cacheFilename)) { |
|
|
|
|||
| 26 | 2 | return 1; |
|
| 27 | } |
||
| 28 | |||
| 29 | 2 | unlink($cacheFilename); |
|
| 30 | |||
| 31 | 2 | $cacheFilename .= '.cache'; |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @var string[] $sources |
||
| 35 | */ |
||
| 36 | 2 | $sources = $input->getArgument('sources'); |
|
| 37 | |||
| 38 | 2 | Compiler::ObtainDispatcher(['cacheFile' => $cacheFilename], ...$sources); |
|
| 39 | |||
| 40 | 2 | $output->write(file_get_contents($cacheFilename) ?: 'false'); |
|
| 41 | |||
| 42 | 2 | unlink($cacheFilename); |
|
| 43 | |||
| 44 | 2 | return 0; |
|
| 45 | } |
||
| 58 |