Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function handle() |
||
30 | { |
||
31 | $executor = Executor::make( |
||
32 | $checkerClass = $this->argument('checkerClass') |
||
|
|||
33 | ); |
||
34 | |||
35 | $this->info('Running checker: ' . $checkerClass); |
||
36 | |||
37 | if ($executor->passes()) { |
||
38 | $this->info('Passes!'); |
||
39 | } else { |
||
40 | $this->error('Fails! ' . $executor->getException()->getMessage()); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 |
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.