@@ -49,7 +49,7 @@ public function printFunction(GlobalFunction $function, ?PhpNamespace $namespace
4949 $ body = ltrim (rtrim (Strings::normalize ($ body )) . "\n" );
5050
5151 return $ this ->printDocComment ($ function )
52- . self :: printAttributes ($ function ->getAttributes ())
52+ . $ this -> printAttributes ($ function ->getAttributes ())
5353 . $ line
5454 . $ this ->printParameters ($ function , strlen ($ line ) + strlen ($ returnType ) + 2 ) // 2 = parentheses
5555 . $ returnType
@@ -72,7 +72,7 @@ public function printClosure(Closure $closure, ?PhpNamespace $namespace = null):
7272 $ body = Helpers::simplifyTaggedNames ($ closure ->getBody (), $ this ->namespace );
7373 $ body = ltrim (rtrim (Strings::normalize ($ body )) . "\n" );
7474
75- return self :: printAttributes ($ closure ->getAttributes (), inline: true )
75+ return $ this -> printAttributes ($ closure ->getAttributes (), inline: true )
7676 . 'function '
7777 . ($ closure ->getReturnReference () ? '& ' : '' )
7878 . $ this ->printParameters ($ closure )
@@ -93,7 +93,7 @@ public function printArrowFunction(Closure $closure, ?PhpNamespace $namespace =
9393
9494 $ body = Helpers::simplifyTaggedNames ($ closure ->getBody (), $ this ->namespace );
9595
96- return self :: printAttributes ($ closure ->getAttributes ())
96+ return $ this -> printAttributes ($ closure ->getAttributes ())
9797 . 'fn '
9898 . ($ closure ->getReturnReference () ? '& ' : '' )
9999 . $ this ->printParameters ($ closure )
@@ -120,7 +120,7 @@ public function printMethod(Method $method, ?PhpNamespace $namespace = null, boo
120120 $ braceOnNextLine = $ this ->bracesOnNextLine && !str_contains ($ params , "\n" );
121121
122122 return $ this ->printDocComment ($ method )
123- . self :: printAttributes ($ method ->getAttributes ())
123+ . $ this -> printAttributes ($ method ->getAttributes ())
124124 . $ line
125125 . $ params
126126 . $ returnType
@@ -133,7 +133,8 @@ public function printMethod(Method $method, ?PhpNamespace $namespace = null, boo
133133 public function printClass (
134134 ClassType |InterfaceType |TraitType |EnumType $ class ,
135135 ?PhpNamespace $ namespace = null ,
136- ): string {
136+ ): string
137+ {
137138 $ this ->namespace = $ this ->resolveTypes ? $ namespace : null ;
138139 $ class ->validate ();
139140 $ resolver = $ this ->namespace
@@ -159,7 +160,7 @@ public function printClass(
159160 foreach ($ class ->getCases () as $ case ) {
160161 $ enumType ??= is_scalar ($ case ->getValue ()) ? get_debug_type ($ case ->getValue ()) : null ;
161162 $ cases [] = $ this ->printDocComment ($ case )
162- . self :: printAttributes ($ case ->getAttributes ())
163+ . $ this -> printAttributes ($ case ->getAttributes ())
163164 . 'case ' . $ case ->getName ()
164165 . ($ case ->getValue () === null ? '' : ' = ' . $ this ->dump ($ case ->getValue ()))
165166 . "; \n" ;
@@ -174,7 +175,7 @@ public function printClass(
174175 . 'const ' . $ const ->getName () . ' = ' ;
175176
176177 $ consts [] = $ this ->printDocComment ($ const )
177- . self :: printAttributes ($ const ->getAttributes ())
178+ . $ this -> printAttributes ($ const ->getAttributes ())
178179 . $ def
179180 . $ this ->dump ($ const ->getValue (), strlen ($ def )) . "; \n" ;
180181 }
@@ -205,7 +206,7 @@ public function printClass(
205206 . '$ ' . $ property ->getName ());
206207
207208 $ properties [] = $ this ->printDocComment ($ property )
208- . self :: printAttributes ($ property ->getAttributes ())
209+ . $ this -> printAttributes ($ property ->getAttributes ())
209210 . $ def
210211 . ($ property ->getValue () === null && !$ property ->isInitialized ()
211212 ? ''
@@ -243,7 +244,7 @@ public function printClass(
243244 $ line [] = $ class ->getName () ? null : '{ ' ;
244245
245246 return $ this ->printDocComment ($ class )
246- . self :: printAttributes ($ class ->getAttributes ())
247+ . $ this -> printAttributes ($ class ->getAttributes ())
247248 . implode (' ' , array_filter ($ line ))
248249 . ($ class ->getName () ? "\n{ \n" : "\n" )
249250 . ($ members ? $ this ->indent (implode ("\n" , $ members )) : '' )
@@ -333,7 +334,7 @@ protected function printParameters(Closure|GlobalFunction|Method $function, int
333334 $ promoted = $ param instanceof PromotedParameter ? $ param : null ;
334335 $ params [] =
335336 ($ promoted ? $ this ->printDocComment ($ promoted ) : '' )
336- . ($ attrs = self :: printAttributes ($ param ->getAttributes (), inline: true ))
337+ . ($ attrs = $ this -> printAttributes ($ param ->getAttributes (), inline: true ))
337338 . ($ promoted ?
338339 ($ promoted ->getVisibility () ?: 'public ' )
339340 . ($ promoted ->isReadOnly () && $ type ? ' readonly ' : '' )
0 commit comments