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