From 843f16ae0c016673ec913e94d5460fd9eb454ca6 Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Fri, 10 Mar 2017 06:45:20 +0300 Subject: [PATCH] Fix status call in andX and orX --- src/Reason.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Reason.php b/src/Reason.php index 58302b6..b25ef8e 100644 --- a/src/Reason.php +++ b/src/Reason.php @@ -91,11 +91,11 @@ class Reason */ public function andX(Reason $other): self { - if ($other->getStatus()->getWeight() > $this->status->getWeight()) { + if ($other->status->getWeight() > $this->status->getWeight()) { return clone $other; } - if ($other->getStatus()->getWeight() === $this->status->getWeight()) { + if ($other->status->getWeight() === $this->status->getWeight()) { return $this->withMessages($other->getMessages()); } @@ -117,11 +117,11 @@ class Reason */ public function orX(Reason $other): self { - if ($other->getStatus()->getWeight() < $this->status->getWeight()) { + if ($other->status->getWeight() < $this->status->getWeight()) { return clone $other; } - if ($other->getStatus()->getWeight() === $this->status->getWeight()) { + if ($other->status->getWeight() === $this->status->getWeight()) { return $this->withMessages($other->getMessages()); }