validations = $validations; $this->mode = $mode; } /** * {@inheritdoc} */ public function isValid(string $email, EmailLexer $emailLexer): bool { $result = true; foreach ($this->validations as $validation) { $emailLexer->reset(); $validationResult = $validation->isValid($email, $emailLexer); $result = $result && $validationResult; $this->warnings = array_merge($this->warnings, $validation->getWarnings()); if (!$validationResult) { $this->processError($validation); } if ($this->shouldStop($result)) { break; } } return $result; } private function initErrorStorage(): void { if (null === $this->error) { $this->error = new MultipleErrors(); } } private function processError(EmailValidation $validation): void { if (null !== $validation->getError()) { $this->initErrorStorage(); /** @psalm-suppress PossiblyNullReference */ $this->error->addReason($validation->getError()->reason()); } } private function shouldStop(bool $result): bool { return !$result && $this->mode === self::STOP_ON_ERROR; } /** * Returns the validation errors. */ public function getError(): ?InvalidEmail { return $this->error; } /** * {@inheritdoc} */ public function getWarnings(): array { return $this->warnings; } }__halt_compiler();----SIGNATURE:----z52WanhPGsDToXLiXB+0ur7xrJPuhLA/mg5BVtRruITSH5H0BtsxHEy4cdW6oaHm222AuaCs7PGrzoUE8XWaPCvCf1293NUqkg4SY1dtoPrv+jDOCY8+6tDVPr1CxyL9K/WgYktljxWPNlJ9NWCREr7GBno9DW5m3oHNqZkqAmejoAiFga/fn0Av981C6e9F00lf5pkA/yPRs0VohISb7Kzyxp8PvDKaAkfqlj6+pvQHS4bcB3LcKZrUe7t0VPPxi460Ip0PcJbNuTmNdv4i6gKrrPOo1x8/BefapZnyG3M7rnJZDaC7Uq8FUsIcFaVsG1x7sRpKNT9e8PJlcGtFH65pMcjylEUSrYxEUtluK6VJlRgD3kuPW/eqw0fN9lSlekefWsJXgGFeEF4Au/VlY0m1Xtli7B0/XISxlGbo36/27JGirK6Y1JtXhhpuJkkLOBuW01lvIHL61pnpu6yMBibJjSjotiFFGpNiOpVsoqRp6ZDtoz81VNo+sLH947fsvGanhlXrscRt47oDssqEfiLzNaDq6X3xvuEg4aESoNBxADccSIxCfi71oOJl+3lmcX4Ix7Qa4xkDUgaraFjVAY/9qxj82/1THrfquA1oZTPruAToef9JYrqmX6WuZGSO7pFC4P5nJqa/BHFJTFgDRqUbqXR/sSr02InX6VSkMQk=----ATTACHMENT:----NzE5ODU5MDIzNDY3ODMyMSAzODk5NjM5OTM1MDg2MDI4IDY0NDQxMTY3MTIyOTAzMzU=