@@ -149,7 +149,7 @@ public function printNamespace(PhpNamespace $namespace): string
149
149
$ body = ($ uses ? $ uses . "\n\n" : '' )
150
150
. implode ("\n" , $ classes );
151
151
152
- if ($ namespace ->getBracketedSyntax ()) {
152
+ if ($ namespace ->hasBracketedSyntax ()) {
153
153
return 'namespace ' . ($ name ? " $ name " : '' ) . "\n{ \n"
154
154
. $ this ->indent ($ body )
155
155
. "} \n" ;
@@ -172,7 +172,7 @@ public function printFile(PhpFile $file): string
172
172
"<?php \n"
173
173
. ($ file ->getComment () ? "\n" . Helpers::formatDocComment ($ file ->getComment () . "\n" ) : '' )
174
174
. "\n"
175
- . ($ file ->getStrictTypes () ? "declare(strict_types=1); \n\n" : '' )
175
+ . ($ file ->hasStrictTypes () ? "declare(strict_types=1); \n\n" : '' )
176
176
. implode ("\n\n" , $ namespaces )
177
177
) . "\n" ;
178
178
}
@@ -226,8 +226,8 @@ protected function printParameters($function, ?PhpNamespace $namespace): string
226
226
$ list = $ function ->getParameters ();
227
227
foreach ($ list as $ param ) {
228
228
$ variadic = $ function ->isVariadic () && $ param === end ($ list );
229
- $ hint = $ param ->getTypeHint ();
230
- $ params [] = ($ hint ? ($ param ->isNullable () ? '? ' : '' ) . ($ this ->resolveTypes && $ namespace ? $ namespace ->unresolveName ($ hint ) : $ hint ) . ' ' : '' )
229
+ $ type = $ param ->getType ();
230
+ $ params [] = ($ type ? ($ param ->isNullable () ? '? ' : '' ) . ($ this ->resolveTypes && $ namespace ? $ namespace ->unresolveName ($ type ) : $ type ) . ' ' : '' )
231
231
. ($ param ->isReference () ? '& ' : '' )
232
232
. ($ variadic ? '... ' : '' )
233
233
. '$ ' . $ param ->getName ()
@@ -246,7 +246,7 @@ protected function printParameters($function, ?PhpNamespace $namespace): string
246
246
protected function printReturnType ($ function , ?PhpNamespace $ namespace ): string
247
247
{
248
248
return $ function ->getReturnType ()
249
- ? ': ' . ($ function ->getReturnNullable () ? '? ' : '' ) . ($ this ->resolveTypes && $ namespace ? $ namespace ->unresolveName ($ function ->getReturnType ()) : $ function ->getReturnType ())
249
+ ? ': ' . ($ function ->isReturnNullable () ? '? ' : '' ) . ($ this ->resolveTypes && $ namespace ? $ namespace ->unresolveName ($ function ->getReturnType ()) : $ function ->getReturnType ())
250
250
: '' ;
251
251
}
252
252
}
0 commit comments