Мелкофиксы в исключениях

* использование valid_strlen() в AtolInnWrongLengthException и AtolTooLongException
* фикс опечатки в AtolEmailTooLongException
This commit is contained in:
Anthony Axenov 2020-06-07 19:25:11 +08:00
parent 2b3713db69
commit 5424726a97
3 changed files with 3 additions and 3 deletions

View File

@ -27,5 +27,5 @@ class AtolEmailTooLongException extends AtolTooLongException
/**
* @var string Сообщение об ошибке
*/
protected $message = 'Email is is too long';
protected $message = 'Email is too long';
}

View File

@ -39,6 +39,6 @@ class AtolInnWrongLengthException extends AtolException
public function __construct($inn, $message = "", $code = 0, Throwable $previous = null)
{
parent::__construct($message ?: 'INN length must be 10 or 12 digits only, but actual is '.
(function_exists('mb_strlen') ? mb_strlen($inn) : strlen($inn)).')', $code, $previous);
valid_strlen($inn), $code, $previous);
}
}

View File

@ -35,6 +35,6 @@ class AtolTooLongException extends AtolException
public function __construct($string, $max, $message = "", $code = 0, Throwable $previous = null)
{
parent::__construct($message ?: $this->message.' (max length - '.$max.', actual length - '.
(function_exists('mb_strlen') ? mb_strlen($string) : strlen($string)).')', $code, $previous);
valid_strlen($string), $code, $previous);
}
}