| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function handle(UpdateCustomer $command): void |
||
| 24 | { |
||
| 25 | /** @var CustomerInterface $customer */ |
||
| 26 | $customer = $this->customerRepository->findOneBy(['email' => $command->email()]); |
||
| 27 | |||
| 28 | $customer->setFirstName($command->firstName()); |
||
| 29 | $customer->setLastName($command->lastName()); |
||
| 30 | $customer->setEmail($command->email()); |
||
| 31 | $customer->setGender($command->gender()); |
||
| 32 | $customer->setBirthday(new \DateTimeImmutable($command->birthday())); |
||
| 33 | $customer->setPhoneNumber($command->phoneNumber()); |
||
| 34 | $customer->setSubscribedToNewsletter($command->subscribedToNewsletter()); |
||
| 35 | |||
| 36 | $this->customerRepository->add($customer); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |