@@ -212,8 +212,8 @@ public function expandBorderShorthand(): void
212212 if (!isset ($ aRules [$ sBorderRule ])) {
213213 continue ;
214214 }
215- $ oRule = $ aRules [$ sBorderRule ];
216- $ mRuleValue = $ oRule ->getValue ();
215+ $ rule = $ aRules [$ sBorderRule ];
216+ $ mRuleValue = $ rule ->getValue ();
217217 $ aValues = [];
218218 if (!$ mRuleValue instanceof RuleValueList) {
219219 $ aValues [] = $ mRuleValue ;
@@ -237,8 +237,8 @@ public function expandBorderShorthand(): void
237237 $ sNewRuleName = $ sBorderRule . '-style ' ;
238238 }
239239 }
240- $ oNewRule = new Rule ($ sNewRuleName , $ oRule ->getLineNo (), $ oRule ->getColNo ());
241- $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
240+ $ oNewRule = new Rule ($ sNewRuleName , $ rule ->getLineNo (), $ rule ->getColNo ());
241+ $ oNewRule ->setIsImportant ($ rule ->getIsImportant ());
242242 $ oNewRule ->addValue ([$ mNewValue ]);
243243 $ this ->addRule ($ oNewRule );
244244 }
@@ -268,8 +268,8 @@ public function expandDimensionsShorthand(): void
268268 if (!isset ($ aRules [$ sProperty ])) {
269269 continue ;
270270 }
271- $ oRule = $ aRules [$ sProperty ];
272- $ mRuleValue = $ oRule ->getValue ();
271+ $ rule = $ aRules [$ sProperty ];
272+ $ mRuleValue = $ rule ->getValue ();
273273 $ aValues = [];
274274 if (!$ mRuleValue instanceof RuleValueList) {
275275 $ aValues [] = $ mRuleValue ;
@@ -298,8 +298,8 @@ public function expandDimensionsShorthand(): void
298298 break ;
299299 }
300300 foreach (['top ' , 'right ' , 'bottom ' , 'left ' ] as $ sPosition ) {
301- $ oNewRule = new Rule (\sprintf ($ sExpanded , $ sPosition ), $ oRule ->getLineNo (), $ oRule ->getColNo ());
302- $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
301+ $ oNewRule = new Rule (\sprintf ($ sExpanded , $ sPosition ), $ rule ->getLineNo (), $ rule ->getColNo ());
302+ $ oNewRule ->setIsImportant ($ rule ->getIsImportant ());
303303 $ oNewRule ->addValue ($ {$ sPosition });
304304 $ this ->addRule ($ oNewRule );
305305 }
@@ -320,7 +320,7 @@ public function expandFontShorthand(): void
320320 if (!isset ($ aRules ['font ' ])) {
321321 return ;
322322 }
323- $ oRule = $ aRules ['font ' ];
323+ $ rule = $ aRules ['font ' ];
324324 // reset properties to 'normal' per http://www.w3.org/TR/21/fonts.html#font-shorthand
325325 $ aFontProperties = [
326326 'font-style ' => 'normal ' ,
@@ -329,7 +329,7 @@ public function expandFontShorthand(): void
329329 'font-size ' => 'normal ' ,
330330 'line-height ' => 'normal ' ,
331331 ];
332- $ mRuleValue = $ oRule ->getValue ();
332+ $ mRuleValue = $ rule ->getValue ();
333333 $ aValues = [];
334334 if (!$ mRuleValue instanceof RuleValueList) {
335335 $ aValues [] = $ mRuleValue ;
@@ -366,9 +366,9 @@ public function expandFontShorthand(): void
366366 }
367367 }
368368 foreach ($ aFontProperties as $ sProperty => $ mValue ) {
369- $ oNewRule = new Rule ($ sProperty , $ oRule ->getLineNo (), $ oRule ->getColNo ());
369+ $ oNewRule = new Rule ($ sProperty , $ rule ->getLineNo (), $ rule ->getColNo ());
370370 $ oNewRule ->addValue ($ mValue );
371- $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
371+ $ oNewRule ->setIsImportant ($ rule ->getIsImportant ());
372372 $ this ->addRule ($ oNewRule );
373373 }
374374 $ this ->removeRule ('font ' );
@@ -389,7 +389,7 @@ public function expandBackgroundShorthand(): void
389389 if (!isset ($ aRules ['background ' ])) {
390390 return ;
391391 }
392- $ oRule = $ aRules ['background ' ];
392+ $ rule = $ aRules ['background ' ];
393393 $ aBgProperties = [
394394 'background-color ' => ['transparent ' ],
395395 'background-image ' => ['none ' ],
@@ -400,7 +400,7 @@ public function expandBackgroundShorthand(): void
400400 new Size (0 , '% ' , false , $ this ->lineNumber ),
401401 ],
402402 ];
403- $ mRuleValue = $ oRule ->getValue ();
403+ $ mRuleValue = $ rule ->getValue ();
404404 $ aValues = [];
405405 if (!$ mRuleValue instanceof RuleValueList) {
406406 $ aValues [] = $ mRuleValue ;
@@ -409,9 +409,9 @@ public function expandBackgroundShorthand(): void
409409 }
410410 if (\count ($ aValues ) == 1 && $ aValues [0 ] == 'inherit ' ) {
411411 foreach ($ aBgProperties as $ sProperty => $ mValue ) {
412- $ oNewRule = new Rule ($ sProperty , $ oRule ->getLineNo (), $ oRule ->getColNo ());
412+ $ oNewRule = new Rule ($ sProperty , $ rule ->getLineNo (), $ rule ->getColNo ());
413413 $ oNewRule ->addValue ('inherit ' );
414- $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
414+ $ oNewRule ->setIsImportant ($ rule ->getIsImportant ());
415415 $ this ->addRule ($ oNewRule );
416416 }
417417 $ this ->removeRule ('background ' );
@@ -444,8 +444,8 @@ public function expandBackgroundShorthand(): void
444444 }
445445 }
446446 foreach ($ aBgProperties as $ sProperty => $ mValue ) {
447- $ oNewRule = new Rule ($ sProperty , $ oRule ->getLineNo (), $ oRule ->getColNo ());
448- $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
447+ $ oNewRule = new Rule ($ sProperty , $ rule ->getLineNo (), $ rule ->getColNo ());
448+ $ oNewRule ->setIsImportant ($ rule ->getIsImportant ());
449449 $ oNewRule ->addValue ($ mValue );
450450 $ this ->addRule ($ oNewRule );
451451 }
@@ -493,8 +493,8 @@ public function expandListStyleShorthand(): void
493493 if (!isset ($ aRules ['list-style ' ])) {
494494 return ;
495495 }
496- $ oRule = $ aRules ['list-style ' ];
497- $ mRuleValue = $ oRule ->getValue ();
496+ $ rule = $ aRules ['list-style ' ];
497+ $ mRuleValue = $ rule ->getValue ();
498498 $ aValues = [];
499499 if (!$ mRuleValue instanceof RuleValueList) {
500500 $ aValues [] = $ mRuleValue ;
@@ -503,9 +503,9 @@ public function expandListStyleShorthand(): void
503503 }
504504 if (\count ($ aValues ) == 1 && $ aValues [0 ] == 'inherit ' ) {
505505 foreach ($ aListProperties as $ sProperty => $ mValue ) {
506- $ oNewRule = new Rule ($ sProperty , $ oRule ->getLineNo (), $ oRule ->getColNo ());
506+ $ oNewRule = new Rule ($ sProperty , $ rule ->getLineNo (), $ rule ->getColNo ());
507507 $ oNewRule ->addValue ('inherit ' );
508- $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
508+ $ oNewRule ->setIsImportant ($ rule ->getIsImportant ());
509509 $ this ->addRule ($ oNewRule );
510510 }
511511 $ this ->removeRule ('list-style ' );
@@ -524,8 +524,8 @@ public function expandListStyleShorthand(): void
524524 }
525525 }
526526 foreach ($ aListProperties as $ sProperty => $ mValue ) {
527- $ oNewRule = new Rule ($ sProperty , $ oRule ->getLineNo (), $ oRule ->getColNo ());
528- $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
527+ $ oNewRule = new Rule ($ sProperty , $ rule ->getLineNo (), $ rule ->getColNo ());
528+ $ oNewRule ->setIsImportant ($ rule ->getIsImportant ());
529529 $ oNewRule ->addValue ($ mValue );
530530 $ this ->addRule ($ oNewRule );
531531 }
@@ -541,15 +541,15 @@ public function expandListStyleShorthand(): void
541541 public function createShorthandProperties (array $ aProperties , $ sShorthand ): void
542542 {
543543 $ aRules = $ this ->getRulesAssoc ();
544- $ oRule = null ;
544+ $ rule = null ;
545545 $ aNewValues = [];
546546 foreach ($ aProperties as $ sProperty ) {
547547 if (!isset ($ aRules [$ sProperty ])) {
548548 continue ;
549549 }
550- $ oRule = $ aRules [$ sProperty ];
551- if (!$ oRule ->getIsImportant ()) {
552- $ mRuleValue = $ oRule ->getValue ();
550+ $ rule = $ aRules [$ sProperty ];
551+ if (!$ rule ->getIsImportant ()) {
552+ $ mRuleValue = $ rule ->getValue ();
553553 $ aValues = [];
554554 if (!$ mRuleValue instanceof RuleValueList) {
555555 $ aValues [] = $ mRuleValue ;
@@ -562,8 +562,8 @@ public function createShorthandProperties(array $aProperties, $sShorthand): void
562562 $ this ->removeRule ($ sProperty );
563563 }
564564 }
565- if ($ aNewValues !== [] && $ oRule instanceof Rule) {
566- $ oNewRule = new Rule ($ sShorthand , $ oRule ->getLineNo (), $ oRule ->getColNo ());
565+ if ($ aNewValues !== [] && $ rule instanceof Rule) {
566+ $ oNewRule = new Rule ($ sShorthand , $ rule ->getLineNo (), $ rule ->getColNo ());
567567 foreach ($ aNewValues as $ mValue ) {
568568 $ oNewRule ->addValue ($ mValue );
569569 }
@@ -636,19 +636,19 @@ public function createDimensionsShorthand(): void
636636 $ aRules = $ this ->getRulesAssoc ();
637637 foreach ($ aExpansions as $ sProperty => $ sExpanded ) {
638638 $ aFoldable = [];
639- foreach ($ aRules as $ sRuleName => $ oRule ) {
639+ foreach ($ aRules as $ sRuleName => $ rule ) {
640640 foreach ($ aPositions as $ sPosition ) {
641641 if ($ sRuleName == \sprintf ($ sExpanded , $ sPosition )) {
642- $ aFoldable [$ sRuleName ] = $ oRule ;
642+ $ aFoldable [$ sRuleName ] = $ rule ;
643643 }
644644 }
645645 }
646646 // All four dimensions must be present
647647 if (\count ($ aFoldable ) == 4 ) {
648648 $ aValues = [];
649649 foreach ($ aPositions as $ sPosition ) {
650- $ oRule = $ aRules [\sprintf ($ sExpanded , $ sPosition )];
651- $ mRuleValue = $ oRule ->getValue ();
650+ $ rule = $ aRules [\sprintf ($ sExpanded , $ sPosition )];
651+ $ mRuleValue = $ rule ->getValue ();
652652 $ aRuleValues = [];
653653 if (!$ mRuleValue instanceof RuleValueList) {
654654 $ aRuleValues [] = $ mRuleValue ;
@@ -657,7 +657,7 @@ public function createDimensionsShorthand(): void
657657 }
658658 $ aValues [$ sPosition ] = $ aRuleValues ;
659659 }
660- $ oNewRule = new Rule ($ sProperty , $ oRule ->getLineNo (), $ oRule ->getColNo ());
660+ $ oNewRule = new Rule ($ sProperty , $ rule ->getLineNo (), $ rule ->getColNo ());
661661 if ((string ) $ aValues ['left ' ][0 ] == (string ) $ aValues ['right ' ][0 ]) {
662662 if ((string ) $ aValues ['top ' ][0 ] == (string ) $ aValues ['bottom ' ][0 ]) {
663663 if ((string ) $ aValues ['top ' ][0 ] == (string ) $ aValues ['left ' ][0 ]) {
@@ -716,8 +716,8 @@ public function createFontShorthand(): void
716716 unset($ oOldRule );
717717 foreach (['font-style ' , 'font-variant ' , 'font-weight ' ] as $ sProperty ) {
718718 if (isset ($ aRules [$ sProperty ])) {
719- $ oRule = $ aRules [$ sProperty ];
720- $ mRuleValue = $ oRule ->getValue ();
719+ $ rule = $ aRules [$ sProperty ];
720+ $ mRuleValue = $ rule ->getValue ();
721721 $ aValues = [];
722722 if (!$ mRuleValue instanceof RuleValueList) {
723723 $ aValues [] = $ mRuleValue ;
@@ -730,8 +730,8 @@ public function createFontShorthand(): void
730730 }
731731 }
732732 // Get the font-size value
733- $ oRule = $ aRules ['font-size ' ];
734- $ mRuleValue = $ oRule ->getValue ();
733+ $ rule = $ aRules ['font-size ' ];
734+ $ mRuleValue = $ rule ->getValue ();
735735 $ aFSValues = [];
736736 if (!$ mRuleValue instanceof RuleValueList) {
737737 $ aFSValues [] = $ mRuleValue ;
@@ -740,8 +740,8 @@ public function createFontShorthand(): void
740740 }
741741 // But wait to know if we have line-height to add it
742742 if (isset ($ aRules ['line-height ' ])) {
743- $ oRule = $ aRules ['line-height ' ];
744- $ mRuleValue = $ oRule ->getValue ();
743+ $ rule = $ aRules ['line-height ' ];
744+ $ mRuleValue = $ rule ->getValue ();
745745 $ aLHValues = [];
746746 if (!$ mRuleValue instanceof RuleValueList) {
747747 $ aLHValues [] = $ mRuleValue ;
@@ -757,8 +757,8 @@ public function createFontShorthand(): void
757757 } else {
758758 $ oNewRule ->addValue ($ aFSValues [0 ]);
759759 }
760- $ oRule = $ aRules ['font-family ' ];
761- $ mRuleValue = $ oRule ->getValue ();
760+ $ rule = $ aRules ['font-family ' ];
761+ $ mRuleValue = $ rule ->getValue ();
762762 $ aFFValues = [];
763763 if (!$ mRuleValue instanceof RuleValueList) {
764764 $ aFFValues [] = $ mRuleValue ;
0 commit comments