| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function handle() |
||
| 32 | { |
||
| 33 | $projectorName = $this->argument('projectorName'); |
||
| 34 | |||
| 35 | $projector = $this->eventProjectionist->getProjector($projectorName); |
||
|
|
|||
| 36 | |||
| 37 | if (! $projector) { |
||
| 38 | $this->warn("No projector named `{$projectorName}` found!"); |
||
| 39 | |||
| 40 | return; |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->snapshotFactory->createForProjector($projector, $this->option('name')); |
||
| 44 | } |
||
| 45 | } |
||
| 47 |
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.