Conditions | 2 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
52 | public function handle(): void |
||
53 | { |
||
54 | $name = $this->argument('name'); |
||
55 | |||
56 | $type = $this->argument('type'); |
||
57 | |||
58 | $status = $this->argument('status'); |
||
59 | |||
60 | $client = $this->manager->createClient($name, $type, $status); |
||
61 | |||
62 | $this->info($client->getData()->status == true ? 'Success' : 'Failed'); |
||
63 | |||
64 | $this->info($client->getData()->message); |
||
65 | |||
66 | $key = $this->manager->getPrivateKey($client->getData()->data->id); |
||
67 | |||
68 | $this->info('client key: '.$key->getData()->data->key); |
||
69 | } |
||
70 | } |
||
71 |
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.