File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -109,13 +109,16 @@ public function addRule(Rule $ruleToAdd, ?Rule $sibling = null): void
109109 if ($ siblingPosition !== false ) {
110110 $ siblingIsInSet = true ;
111111 $ position = $ siblingPosition ;
112- } elseif ($ siblingIsInSet = $ this ->hasRule ($ sibling )) {
113- // Maintain ordering within `$this->rules[$propertyName]`
114- // by inserting before first `Rule` with a same-or-later position than the sibling.
115- foreach ($ this ->rules [$ propertyName ] as $ index => $ rule ) {
116- if (self ::comparePositionable ($ rule , $ sibling ) >= 0 ) {
117- $ position = $ index ;
118- break ;
112+ } else {
113+ $ siblingIsInSet = $ this ->hasRule ($ sibling );
114+ if ($ siblingIsInSet ) {
115+ // Maintain ordering within `$this->rules[$propertyName]`
116+ // by inserting before first `Rule` with a same-or-later position than the sibling.
117+ foreach ($ this ->rules [$ propertyName ] as $ index => $ rule ) {
118+ if (self ::comparePositionable ($ rule , $ sibling ) >= 0 ) {
119+ $ position = $ index ;
120+ break ;
121+ }
119122 }
120123 }
121124 }
You can’t perform that action at this time.
0 commit comments