diff --git a/src/TrinaryLogic.php b/src/TrinaryLogic.php index a587099844..538f81fc66 100644 --- a/src/TrinaryLogic.php +++ b/src/TrinaryLogic.php @@ -79,9 +79,15 @@ public function toBooleanType(): BooleanType public function and(self ...$operands): self { - $operandValues = array_column($operands, 'value'); - $operandValues[] = $this->value; - return self::create(min($operandValues)); + $min = $this->value; + foreach ($operands as $operand) { + if ($operand->value >= $min) { + continue; + } + + $min = $operand->value; + } + return self::create($min); } /**