@@ -12,11 +12,11 @@ class OutputFormatter
1212 /**
1313 * @var OutputFormat
1414 */
15- private $ oFormat ;
15+ private $ outputFormat ;
1616
17- public function __construct (OutputFormat $ oFormat )
17+ public function __construct (OutputFormat $ outputFormat )
1818 {
19- $ this ->oFormat = $ oFormat ;
19+ $ this ->outputFormat = $ outputFormat ;
2020 }
2121
2222 /**
@@ -25,7 +25,7 @@ public function __construct(OutputFormat $oFormat)
2525 */
2626 public function space ($ sName , $ sType = null ): string
2727 {
28- $ sSpaceString = $ this ->oFormat ->get ("Space $ sName " );
28+ $ sSpaceString = $ this ->outputFormat ->get ("Space $ sName " );
2929 // If $sSpaceString is an array, we have multiple values configured
3030 // depending on the type of object the space applies to
3131 if (\is_array ($ sSpaceString )) {
@@ -91,7 +91,7 @@ public function spaceAfterSelectorSeparator(): string
9191 */
9292 public function spaceBeforeListArgumentSeparator ($ sSeparator ): string
9393 {
94- $ spaceForSeparator = $ this ->oFormat ->getSpaceBeforeListArgumentSeparators ();
94+ $ spaceForSeparator = $ this ->outputFormat ->getSpaceBeforeListArgumentSeparators ();
9595
9696 return $ spaceForSeparator [$ sSeparator ] ?? $ this ->space ('BeforeListArgumentSeparator ' , $ sSeparator );
9797 }
@@ -101,7 +101,7 @@ public function spaceBeforeListArgumentSeparator($sSeparator): string
101101 */
102102 public function spaceAfterListArgumentSeparator ($ sSeparator ): string
103103 {
104- $ spaceForSeparator = $ this ->oFormat ->getSpaceAfterListArgumentSeparators ();
104+ $ spaceForSeparator = $ this ->outputFormat ->getSpaceAfterListArgumentSeparators ();
105105
106106 return $ spaceForSeparator [$ sSeparator ] ?? $ this ->space ('AfterListArgumentSeparator ' , $ sSeparator );
107107 }
@@ -120,7 +120,7 @@ public function spaceBeforeOpeningBrace(): string
120120 */
121121 public function safely ($ cCode )
122122 {
123- if ($ this ->oFormat ->get ('IgnoreExceptions ' )) {
123+ if ($ this ->outputFormat ->get ('IgnoreExceptions ' )) {
124124 // If output exceptions are ignored, run the code with exception guards
125125 try {
126126 return $ cCode ();
@@ -142,9 +142,9 @@ public function safely($cCode)
142142 public function implode (string $ sSeparator , array $ aValues , $ bIncreaseLevel = false ): string
143143 {
144144 $ result = '' ;
145- $ oFormat = $ this ->oFormat ;
145+ $ outputFormat = $ this ->outputFormat ;
146146 if ($ bIncreaseLevel ) {
147- $ oFormat = $ oFormat ->nextLevel ();
147+ $ outputFormat = $ outputFormat ->nextLevel ();
148148 }
149149 $ bIsFirst = true ;
150150 foreach ($ aValues as $ mValue ) {
@@ -154,7 +154,7 @@ public function implode(string $sSeparator, array $aValues, $bIncreaseLevel = fa
154154 $ result .= $ sSeparator ;
155155 }
156156 if ($ mValue instanceof Renderable) {
157- $ result .= $ mValue ->render ($ oFormat );
157+ $ result .= $ mValue ->render ($ outputFormat );
158158 } else {
159159 $ result .= $ mValue ;
160160 }
@@ -169,7 +169,7 @@ public function implode(string $sSeparator, array $aValues, $bIncreaseLevel = fa
169169 */
170170 public function removeLastSemicolon ($ sString )
171171 {
172- if ($ this ->oFormat ->get ('SemicolonAfterLastRule ' )) {
172+ if ($ this ->outputFormat ->get ('SemicolonAfterLastRule ' )) {
173173 return $ sString ;
174174 }
175175 $ sString = \explode ('; ' , $ sString );
@@ -184,7 +184,7 @@ public function removeLastSemicolon($sString)
184184
185185 public function comments (Commentable $ oCommentable ): string
186186 {
187- if (!$ this ->oFormat ->bRenderComments ) {
187+ if (!$ this ->outputFormat ->bRenderComments ) {
188188 return '' ;
189189 }
190190
@@ -193,7 +193,7 @@ public function comments(Commentable $oCommentable): string
193193 $ iLastCommentIndex = \count ($ comments ) - 1 ;
194194
195195 foreach ($ comments as $ i => $ oComment ) {
196- $ result .= $ oComment ->render ($ this ->oFormat );
196+ $ result .= $ oComment ->render ($ this ->outputFormat );
197197 $ result .= $ i === $ iLastCommentIndex ? $ this ->spaceAfterBlocks () : $ this ->spaceBetweenBlocks ();
198198 }
199199 return $ result ;
@@ -212,6 +212,6 @@ private function prepareSpace($sSpaceString): string
212212 */
213213 private function indent (): string
214214 {
215- return \str_repeat ($ this ->oFormat ->sIndentation , $ this ->oFormat ->getIndentationLevel ());
215+ return \str_repeat ($ this ->outputFormat ->sIndentation , $ this ->outputFormat ->getIndentationLevel ());
216216 }
217217}
0 commit comments