src/Rule/AndRule.php 1 location
|
@@ 328-333 (lines=6) @@
|
| 325 |
|
*/ |
| 326 |
|
public function hasSolution(array $contextual_options=[]) |
| 327 |
|
{ |
| 328 |
|
if ( ! $this->simplicationStepReached(self::simplified)) { |
| 329 |
|
throw new \LogicException( |
| 330 |
|
"hasSolution has no sens if the rule is not simplified instead of being at: " |
| 331 |
|
.var_export($this->current_simplification_step, true) |
| 332 |
|
); |
| 333 |
|
} |
| 334 |
|
|
| 335 |
|
// atomic rules |
| 336 |
|
foreach ($this->getOperands() as $operand) { |
src/Rule/OrRule.php 1 location
|
@@ 280-285 (lines=6) @@
|
| 277 |
|
return true; |
| 278 |
|
} |
| 279 |
|
|
| 280 |
|
if ( ! $this->simplicationStepReached(self::simplified)) { |
| 281 |
|
throw new \LogicException( |
| 282 |
|
"hasSolution has no sens if the rule is not simplified instead of being at: " |
| 283 |
|
.var_export($this->current_simplification_step, true) |
| 284 |
|
); |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
// If there is no remaining operand in an OrRule, it means it has |
| 288 |
|
// no solution. |