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