| Conditions | 3 |
| Paths | 4 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function handle(): int |
||
| 29 | { |
||
| 30 | $type = $this->argument('type'); |
||
| 31 | |||
| 32 | if (! \in_array($type, ['backfill', 'binaries'], true)) { |
||
| 33 | $this->error('Type must be either: binaries or backfill'); |
||
| 34 | $this->line(''); |
||
| 35 | $this->line('binaries => Do Safe Binaries update'); |
||
| 36 | $this->line('backfill => Do Safe Backfill update'); |
||
| 37 | |||
| 38 | return self::FAILURE; |
||
| 39 | } |
||
| 40 | |||
| 41 | try { |
||
| 42 | $service = new ForkingService; |
||
| 43 | |||
| 44 | match ($type) { |
||
| 45 | 'binaries' => $service->safeBinaries(), |
||
|
|
|||
| 46 | 'backfill' => $service->safeBackfill(), |
||
| 47 | }; |
||
| 48 | |||
| 49 | return self::SUCCESS; |
||
| 50 | } catch (\Exception $e) { |
||
| 51 | $this->error($e->getMessage()); |
||
| 52 | |||
| 53 | return self::FAILURE; |
||
| 54 | } |
||
| 57 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.