| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 33 | 2 | public function handle(UserCommand $command): PromiseInterface |
|
| 34 | { |
||
| 35 | 2 | $user = $command->getUser(); |
|
| 36 | |||
| 37 | 2 | if (strlen($user) > 0) { |
|
| 38 | 1 | return $this->service->fetch('users/' . $user, '', UserInterface::HYDRATE_CLASS); |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | return $this->service->fetch('user', '', UserInterface::HYDRATE_CLASS); |
|
| 42 | } |
||
| 43 | } |
||
| 44 |