* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Adapter\Profile\Employee\QueryHandler; use PrestaShop\PrestaShop\Adapter\Profile\Employee\AbstractEmployeeHandler; use PrestaShop\PrestaShop\Core\Domain\Employee\Query\GetEmployeeEmailById; use PrestaShop\PrestaShop\Core\Domain\Employee\QueryHandler\GetEmployeeEmailByIdHandlerInterface; use PrestaShop\PrestaShop\Core\Domain\ValueObject\Email; final class GetEmployeeEmailByIdHandler extends AbstractEmployeeHandler implements GetEmployeeEmailByIdHandlerInterface { /** * {@inheritdoc} */ public function handle(GetEmployeeEmailById $query): Email { $employee = $this->getEmployee($query->getEmployeeId()); return new Email($employee->email); } }