diff --git a/src/RuleSet/RuleSet.php b/src/RuleSet/RuleSet.php index c7380ccb..e6aa865d 100644 --- a/src/RuleSet/RuleSet.php +++ b/src/RuleSet/RuleSet.php @@ -101,7 +101,7 @@ public function getLineNo(): int return $this->lineNumber; } - public function addRule(Rule $rule, ?Rule $oSibling = null): void + public function addRule(Rule $rule, ?Rule $sibling = null): void { $sRule = $rule->getRule(); if (!isset($this->rules[$sRule])) { @@ -110,11 +110,11 @@ public function addRule(Rule $rule, ?Rule $oSibling = null): void $position = \count($this->rules[$sRule]); - if ($oSibling !== null) { - $iSiblingPos = \array_search($oSibling, $this->rules[$sRule], true); + if ($sibling !== null) { + $iSiblingPos = \array_search($sibling, $this->rules[$sRule], true); if ($iSiblingPos !== false) { $position = $iSiblingPos; - $rule->setPosition($oSibling->getLineNo(), $oSibling->getColNo() - 1); + $rule->setPosition($sibling->getLineNo(), $sibling->getColNo() - 1); } } if ($rule->getLineNo() === 0 && $rule->getColNo() === 0) {