From 5424726a976c402f3d11dbdba1906d3d04815e7a Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 7 Jun 2020 19:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=BE=D1=84=D0=B8?= =?UTF-8?q?=D0=BA=D1=81=D1=8B=20=D0=B2=20=D0=B8=D1=81=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * использование valid_strlen() в AtolInnWrongLengthException и AtolTooLongException * фикс опечатки в AtolEmailTooLongException --- src/AtolOnline/Exceptions/AtolEmailTooLongException.php | 2 +- src/AtolOnline/Exceptions/AtolInnWrongLengthException.php | 2 +- src/AtolOnline/Exceptions/AtolTooLongException.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AtolOnline/Exceptions/AtolEmailTooLongException.php b/src/AtolOnline/Exceptions/AtolEmailTooLongException.php index e3bfc2b..0947e85 100644 --- a/src/AtolOnline/Exceptions/AtolEmailTooLongException.php +++ b/src/AtolOnline/Exceptions/AtolEmailTooLongException.php @@ -27,5 +27,5 @@ class AtolEmailTooLongException extends AtolTooLongException /** * @var string Сообщение об ошибке */ - protected $message = 'Email is is too long'; + protected $message = 'Email is too long'; } \ No newline at end of file diff --git a/src/AtolOnline/Exceptions/AtolInnWrongLengthException.php b/src/AtolOnline/Exceptions/AtolInnWrongLengthException.php index 6f63c76..2cd2ac5 100644 --- a/src/AtolOnline/Exceptions/AtolInnWrongLengthException.php +++ b/src/AtolOnline/Exceptions/AtolInnWrongLengthException.php @@ -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); } } \ No newline at end of file diff --git a/src/AtolOnline/Exceptions/AtolTooLongException.php b/src/AtolOnline/Exceptions/AtolTooLongException.php index 499a6da..eb56c53 100644 --- a/src/AtolOnline/Exceptions/AtolTooLongException.php +++ b/src/AtolOnline/Exceptions/AtolTooLongException.php @@ -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); } } \ No newline at end of file