/** * {@inheritdoc} */ public function assert($item) { if (!isset($item)) { return; } try { $this->next->assert($item); } catch (InvalidValueException $exception) { return; } $errorType = ValidatorAbstract::ERROR_TYPE; if ($this->next instanceof ValidatorAbstract) { $errorType = $this->next->getErrorType(); } $suffix = isset($this->name) ? '@' . $this->name : ''; throw new InvalidValueException('not.' . $errorType . $suffix); }