1 | <?php |
||
25 | class ParserCompileCommand extends Command |
||
26 | { |
||
27 | /** |
||
28 | * @var string Default parser output path |
||
29 | */ |
||
30 | private const DEFAULT_PATH = __DIR__ . '/../Parser'; |
||
31 | |||
32 | /** |
||
33 | * @var string Default generated parser FQN |
||
34 | */ |
||
35 | private const DEFAULT_PARSER_CLASS_NAME = \Railt\SDL\Parser\SchemaParser::class; |
||
36 | |||
37 | /** |
||
38 | * @param InputInterface $in |
||
39 | * @param OutputInterface $out |
||
40 | * @return int|null|void |
||
41 | * @throws \LogicException |
||
42 | */ |
||
43 | public function execute(InputInterface $in, OutputInterface $out) |
||
50 | |||
51 | /** |
||
52 | * @param InputInterface $in |
||
53 | * @param ParsingResult $reader |
||
54 | * @throws \Symfony\Component\Console\Exception\InvalidArgumentException |
||
55 | */ |
||
56 | private function buildParser(InputInterface $in, ParsingResult $reader): void |
||
64 | |||
65 | /** |
||
66 | * @param string $class |
||
67 | * @return array |
||
68 | */ |
||
69 | private function split(string $class): array |
||
75 | |||
76 | /** |
||
77 | * @return void |
||
78 | * @throws \Symfony\Component\Console\Exception\InvalidArgumentException |
||
79 | * @throws \Symfony\Component\Console\Exception\LogicException |
||
80 | */ |
||
81 | protected function configure(): void |
||
107 | } |
||
108 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.