Fix status call in andX and orX
This commit is contained in:
parent
4268ea02d3
commit
843f16ae0c
@ -91,11 +91,11 @@ class Reason
|
|||||||
*/
|
*/
|
||||||
public function andX(Reason $other): self
|
public function andX(Reason $other): self
|
||||||
{
|
{
|
||||||
if ($other->getStatus()->getWeight() > $this->status->getWeight()) {
|
if ($other->status->getWeight() > $this->status->getWeight()) {
|
||||||
return clone $other;
|
return clone $other;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other->getStatus()->getWeight() === $this->status->getWeight()) {
|
if ($other->status->getWeight() === $this->status->getWeight()) {
|
||||||
return $this->withMessages($other->getMessages());
|
return $this->withMessages($other->getMessages());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,11 +117,11 @@ class Reason
|
|||||||
*/
|
*/
|
||||||
public function orX(Reason $other): self
|
public function orX(Reason $other): self
|
||||||
{
|
{
|
||||||
if ($other->getStatus()->getWeight() < $this->status->getWeight()) {
|
if ($other->status->getWeight() < $this->status->getWeight()) {
|
||||||
return clone $other;
|
return clone $other;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other->getStatus()->getWeight() === $this->status->getWeight()) {
|
if ($other->status->getWeight() === $this->status->getWeight()) {
|
||||||
return $this->withMessages($other->getMessages());
|
return $this->withMessages($other->getMessages());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user