mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2024-11-22 16:14:34 +00:00
Мелкофиксы в исключениях
* использование valid_strlen() в AtolInnWrongLengthException и AtolTooLongException * фикс опечатки в AtolEmailTooLongException
This commit is contained in:
parent
2b3713db69
commit
5424726a97
@ -27,5 +27,5 @@ class AtolEmailTooLongException extends AtolTooLongException
|
|||||||
/**
|
/**
|
||||||
* @var string Сообщение об ошибке
|
* @var string Сообщение об ошибке
|
||||||
*/
|
*/
|
||||||
protected $message = 'Email is is too long';
|
protected $message = 'Email is too long';
|
||||||
}
|
}
|
@ -39,6 +39,6 @@ class AtolInnWrongLengthException extends AtolException
|
|||||||
public function __construct($inn, $message = "", $code = 0, Throwable $previous = null)
|
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 '.
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,6 +35,6 @@ class AtolTooLongException extends AtolException
|
|||||||
public function __construct($string, $max, $message = "", $code = 0, Throwable $previous = null)
|
public function __construct($string, $max, $message = "", $code = 0, Throwable $previous = null)
|
||||||
{
|
{
|
||||||
parent::__construct($message ?: $this->message.' (max length - '.$max.', actual length - '.
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user