Remove useless if
parent
cdf3b4e012
commit
9ffe0d13f5
|
@ -57,17 +57,18 @@ class RuleWatchGraph
|
||||||
if (!$node->getRule()->isDisabled() && !call_user_func($skipCallback, $otherWatch)) {
|
if (!$node->getRule()->isDisabled() && !call_user_func($skipCallback, $otherWatch)) {
|
||||||
$ruleLiterals = $node->getRule()->getLiterals();
|
$ruleLiterals = $node->getRule()->getLiterals();
|
||||||
|
|
||||||
if (sizeof($ruleLiterals) > 2) {
|
|
||||||
foreach ($ruleLiterals as $ruleLiteral) {
|
foreach ($ruleLiterals as $ruleLiteral) {
|
||||||
if ($otherWatch !== $ruleLiteral->getId() &&
|
$ruleLiteralId = $ruleLiteral->getId();
|
||||||
!call_user_func($conflictCallback, $ruleLiteral->getId())) {
|
|
||||||
|
|
||||||
$this->moveWatch($literalId, $ruleLiteral->getId(), $node);
|
if ($literalId !== $ruleLiteralId &&
|
||||||
|
$otherWatch !== $ruleLiteralId &&
|
||||||
|
!call_user_func($conflictCallback, $ruleLiteralId)) {
|
||||||
|
|
||||||
|
$this->moveWatch($literalId, $ruleLiteralId, $node);
|
||||||
|
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (call_user_func($conflictCallback, $otherWatch)) {
|
if (call_user_func($conflictCallback, $otherWatch)) {
|
||||||
return $node->getRule();
|
return $node->getRule();
|
||||||
|
|
Loading…
Reference in New Issue