We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69369f4 commit faef8e0Copy full SHA for faef8e0
src/TrinaryLogic.php
@@ -79,9 +79,15 @@ public function toBooleanType(): BooleanType
79
80
public function and(self ...$operands): self
81
{
82
- $operandValues = array_column($operands, 'value');
83
- $operandValues[] = $this->value;
84
- return self::create(min($operandValues));
+ $min = $this->value;
+ foreach ($operands as $operand) {
+ if ($operand->value >= $min) {
85
+ continue;
86
+ }
87
+
88
+ $min = $operand->value;
89
90
+ return self::create($min);
91
}
92
93
/**
0 commit comments