From 9d2617858de7444815fecb16d0a4b50277870ce4 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 28 Nov 2021 00:44:43 +0800 Subject: [PATCH] =?UTF-8?q?`AgentInfo`:=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20=D1=82=D0=B8=D0=BF=D0=B0=20=D0=B0=D0=B3=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=B0=20=D0=B8=D0=B7=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82?= =?UTF-8?q?=D1=80=D1=83=D0=BA=D1=82=D0=BE=D1=80=D0=B0=20=D0=B2=20=D1=81?= =?UTF-8?q?=D0=B5=D1=82=D1=82=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Entities/AgentInfo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Entities/AgentInfo.php b/src/Entities/AgentInfo.php index d311c3e..346cd4a 100644 --- a/src/Entities/AgentInfo.php +++ b/src/Entities/AgentInfo.php @@ -56,7 +56,7 @@ class AgentInfo extends Entity ?ReceivePaymentsOperator $receive_payments_operator = null, ?MoneyTransferOperator $money_transfer_operator = null, ) { - !is_null($type) && AgentTypes::isValid($type) && $this->setType($type); + !is_null($type) && $this->setType($type); !is_null($paying_agent) && $this->setPayingAgent($paying_agent); !is_null($receive_payments_operator) && $this->setReceivePaymentsOperator($receive_payments_operator); !is_null($money_transfer_operator) && $this->setMoneyTransferOperator($money_transfer_operator); @@ -77,10 +77,11 @@ class AgentInfo extends Entity * * @param string|null $type * @return AgentInfo + * @throws InvalidEnumValueException */ public function setType(?string $type): AgentInfo { - $this->type = $type; + AgentTypes::isValid($type) && $this->type = $type; return $this; }