We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 270b546 commit c6b671cCopy full SHA for c6b671c
src/TrinaryLogic.php
@@ -119,9 +119,15 @@ public function lazyAnd(
119
120
public function or(self ...$operands): self
121
{
122
- $operandValues = array_column($operands, 'value');
123
- $operandValues[] = $this->value;
124
- return self::create(max($operandValues));
+ $max = $this->value;
+ foreach ($operands as $operand) {
+ if ($operand->value < $max) {
125
+ continue;
126
+ }
127
+
128
+ $max = $operand->value;
129
130
+ return self::create($max);
131
}
132
133
/**
0 commit comments