@@ -98,14 +98,14 @@ public function printClass(ClassType $class, PhpNamespace $namespace = null): st
9898 foreach ($ class ->getConstants () as $ const ) {
9999 $ consts [] = Helpers::formatDocComment ((string ) $ const ->getComment ())
100100 . ($ const ->getVisibility () ? $ const ->getVisibility () . ' ' : '' )
101- . 'const ' . $ const ->getName () . ' = ' . Helpers:: dump ($ const ->getValue ()) . "; \n" ;
101+ . 'const ' . $ const ->getName () . ' = ' . $ this -> dump ($ const ->getValue ()) . "; \n" ;
102102 }
103103
104104 $ properties = [];
105105 foreach ($ class ->getProperties () as $ property ) {
106106 $ properties [] = Helpers::formatDocComment ((string ) $ property ->getComment ())
107107 . ($ property ->getVisibility () ?: 'public ' ) . ($ property ->isStatic () ? ' static ' : '' ) . ' $ ' . $ property ->getName ()
108- . ($ property ->getValue () === null ? '' : ' = ' . Helpers:: dump ($ property ->getValue ()))
108+ . ($ property ->getValue () === null ? '' : ' = ' . $ this -> dump ($ property ->getValue ()))
109109 . "; \n" ;
110110 }
111111
@@ -194,6 +194,12 @@ protected function indent(string $s): string
194194 }
195195
196196
197+ protected function dump ($ var ): string
198+ {
199+ return Helpers::dump ($ var );
200+ }
201+
202+
197203 protected function printUses (PhpNamespace $ namespace ): string
198204 {
199205 $ name = $ namespace ->getName ();
@@ -225,7 +231,7 @@ protected function printParameters($function, ?PhpNamespace $namespace): string
225231 . ($ param ->isReference () ? '& ' : '' )
226232 . ($ variadic ? '... ' : '' )
227233 . '$ ' . $ param ->getName ()
228- . ($ param ->hasDefaultValue () && !$ variadic ? ' = ' . Helpers:: dump ($ param ->getDefaultValue ()) : '' );
234+ . ($ param ->hasDefaultValue () && !$ variadic ? ' = ' . $ this -> dump ($ param ->getDefaultValue ()) : '' );
229235 }
230236
231237 return strlen ($ tmp = implode (', ' , $ params )) > Helpers::WRAP_LENGTH && count ($ params ) > 1
0 commit comments