@@ -27,25 +27,24 @@ public function __construct(\PHPFUI\InstaDoc\Controller $controller, string $ful
2727
2828 try
2929 {
30- /** @phpstan-ignore-next-line */
30+ // @phpstan-ignore-next-line
3131 $ this ->reflection ->isInstantiable ();
3232 }
33- catch (\Throwable $ e )
33+ catch (\Throwable )
3434 {
3535 $ this ->reflection = new \ReflectionEnum ($ fullClassPath );
3636 }
3737 }
38- catch (\Throwable $ e )
38+ catch (\Throwable )
3939 {
4040 }
4141 }
4242 }
4343
4444 /**
45- * @param \ReflectionFunction | \ReflectionMethod $method
4645 * @param array<string, string> $parameterComments comments indexed by parameter name
4746 */
48- public function getMethodParameters ($ method , array $ parameterComments = []) : string
47+ public function getMethodParameters (\ ReflectionFunction | \ ReflectionMethod $ method , array $ parameterComments = []) : string
4948 {
5049 $ info = $ comma = '' ;
5150
@@ -84,7 +83,7 @@ public function getMethodParameters($method, array $parameterComments = []) : st
8483 {
8584 if (\is_object ($ value ))
8685 {
87- $ value = \get_class ( $ value) ;
86+ $ value = $ value::class ;
8887 }
8988 $ extra = $ parameter ->getDefaultValueConstantName ();
9089 $ info .= \str_replace ($ value , '' , $ extra );
@@ -128,7 +127,7 @@ public function getValueString(mixed $value) : string
128127 break ;
129128
130129 case 'object ' :
131- $ class = \get_class ( $ value) ;
130+ $ class = $ value::class ;
132131
133132 if ('ReflectionNamedType ' == $ class )
134133 {
@@ -252,7 +251,7 @@ protected function formatComments(?\phpDocumentor\Reflection\DocBlock $docBlock,
252251
253252 if (\method_exists ($ tag , 'getAuthorName ' ))
254253 {
255- /** @phpstan-ignore-next-line */
254+ // @phpstan-ignore-next-line
256255 $ body .= \PHPFUI \Link::email ($ tag ->getEmail (), $ tag ->getAuthorName ());
257256 }
258257
@@ -329,7 +328,7 @@ protected function getClassName(string $class, bool $asLink = true) : string
329328 $ class = \substr ($ class , 1 );
330329 }
331330
332- if (false !== \strpos ($ class , '[] ' ))
331+ if (\str_contains ($ class , '[] ' ))
333332 {
334333 $ array = '[] ' ;
335334 $ class = \str_replace ($ array , '' , $ class );
@@ -402,7 +401,7 @@ protected function getDocBlock(object $method) : ?\phpDocumentor\Reflection\DocB
402401 {
403402 $ docBlock = $ this ->factory ->create ($ comments );
404403 }
405- catch (\Exception $ e )
404+ catch (\Exception )
406405 {
407406 $ docBlock = null ;
408407 }
@@ -444,7 +443,7 @@ protected function getInheritedText(\phpDocumentor\Reflection\DocBlock $docBlock
444443 {
445444 $ method = $ parent ->getMethod ($ reflectionMethod ->name );
446445 }
447- catch (\Throwable $ e )
446+ catch (\Throwable )
448447 {
449448 $ method = null ;
450449 }
@@ -488,7 +487,7 @@ protected function getInheritedDocBlock(array $tags, \ReflectionMethod $reflecti
488487 {
489488 $ method = $ parent ->getMethod ($ reflectionMethod ->name );
490489 }
491- catch (\Throwable $ e )
490+ catch (\Throwable )
492491 {
493492 $ method = null ;
494493 }
@@ -534,7 +533,7 @@ protected function getParameterComments(?\phpDocumentor\Reflection\DocBlock $doc
534533
535534 if ('param ' == $ name && $ description )
536535 {
537- /** @phpstan-ignore-next-line */
536+ // @phpstan-ignore-next-line
538537 $ var = $ tag ->getVariableName ();
539538 $ comments [$ var ] = $ this ->parsedown ->html ($ description );
540539 }
@@ -543,10 +542,7 @@ protected function getParameterComments(?\phpDocumentor\Reflection\DocBlock $doc
543542 return $ comments ;
544543 }
545544
546- /**
547- * @param \ReflectionFunction | \ReflectionMethod $method
548- */
549- protected function getMethodParametersBlock ($ method ) : string
545+ protected function getMethodParametersBlock (\ReflectionFunction |\ReflectionMethod $ method ) : string
550546 {
551547 $ docBlock = $ this ->getDocBlock ($ method );
552548 $ parameterComments = $ this ->getParameterComments ($ docBlock );
0 commit comments