Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | private function findCustomer($command): Customer |
||
40 | { |
||
41 | if (empty($command->customer_id)) { |
||
42 | return $this->getCurrentCustomer(); |
||
43 | } |
||
44 | |||
45 | $res = $this->repo->findById($command->customer_id); |
||
|
|||
46 | if (empty($res)) { |
||
47 | return $this->getCurrentCustomer(); |
||
48 | } |
||
49 | |||
50 | return $res; |
||
51 | } |
||
58 |