Change "else if" to "elseif"
parent
99200af51b
commit
21c7e219e2
|
@ -204,7 +204,7 @@ class RuleSetGenerator
|
||||||
|
|
||||||
if (($package instanceof AliasPackage) && $package->getAliasOf() === $provider) {
|
if (($package instanceof AliasPackage) && $package->getAliasOf() === $provider) {
|
||||||
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createRequireRule($package, array($provider), Rule::RULE_PACKAGE_ALIAS, (string) $package));
|
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createRequireRule($package, array($provider), Rule::RULE_PACKAGE_ALIAS, (string) $package));
|
||||||
} else if (!$this->obsoleteImpossibleForAlias($package, $provider)) {
|
} elseif (!$this->obsoleteImpossibleForAlias($package, $provider)) {
|
||||||
$reason = ($package->getName() == $provider->getName()) ? Rule::RULE_PACKAGE_SAME_NAME : Rule::RULE_PACKAGE_IMPLICIT_OBSOLETES;
|
$reason = ($package->getName() == $provider->getName()) ? Rule::RULE_PACKAGE_SAME_NAME : Rule::RULE_PACKAGE_IMPLICIT_OBSOLETES;
|
||||||
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createConflictRule($package, $provider, $reason, (string) $package));
|
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createConflictRule($package, $provider, $reason, (string) $package));
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,7 +381,7 @@ class Solver
|
||||||
throw new SolverBugException(
|
throw new SolverBugException(
|
||||||
"Trying to revert to invalid level ".(int) $newLevel." from level ".(int) $level."."
|
"Trying to revert to invalid level ".(int) $newLevel." from level ".(int) $level."."
|
||||||
);
|
);
|
||||||
} else if (!$newRule) {
|
} elseif (!$newRule) {
|
||||||
throw new SolverBugException(
|
throw new SolverBugException(
|
||||||
"No rule was learned from analyzing $rule at level $level."
|
"No rule was learned from analyzing $rule at level $level."
|
||||||
);
|
);
|
||||||
|
@ -451,7 +451,7 @@ class Solver
|
||||||
|
|
||||||
if (1 === $l) {
|
if (1 === $l) {
|
||||||
$l1num++;
|
$l1num++;
|
||||||
} else if ($level === $l) {
|
} elseif ($level === $l) {
|
||||||
$num++;
|
$num++;
|
||||||
} else {
|
} else {
|
||||||
// not level1 or conflict level, add to new rule
|
// not level1 or conflict level, add to new rule
|
||||||
|
@ -660,7 +660,7 @@ class Solver
|
||||||
|
|
||||||
if ($foundDisabled && $rule->isEnabled()) {
|
if ($foundDisabled && $rule->isEnabled()) {
|
||||||
$rule->disable();
|
$rule->disable();
|
||||||
} else if (!$foundDisabled && $rule->isDisabled()) {
|
} elseif (!$foundDisabled && $rule->isDisabled()) {
|
||||||
$rule->enable();
|
$rule->enable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue