Skip to content

Commit

Permalink
Update src/TypeString.php
Browse files Browse the repository at this point in the history
Co-authored-by: Yoshitaka Jingu <yoshitaka.jingu@gmail.com>
  • Loading branch information
koriym and jingu authored Feb 2, 2024
1 parent 6a6c17a commit 8c93232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TypeString.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function getUnionType(ReflectionUnionType $type): string

private static function getFqnType(ReflectionNamedType $type): string
{
$isBuiltinOrSelf = $type->isBuiltin();
$isBuiltin = $type->isBuiltin() || in_array($type->getName(), ['static', 'self'], true);

Check failure on line 83 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Function in_array() should not be referenced via a fallback global name, but via a use statement.

Check failure on line 83 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / sa / Psalm

TypeDoesNotContainType: Operand of type false is always falsy

Check failure on line 83 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / sa / Psalm

TypeDoesNotContainType: Operand of type false is always falsy

Check failure on line 83 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Function in_array() should not be referenced via a fallback global name, but via a use statement.

return $isBuiltinOrSelf ? $type->getName() : '\\' . $type->getName();

Check failure on line 85 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / sa / PHPStan

Undefined variable: $isBuiltinOrSelf

Check failure on line 85 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / sa / Psalm

UndefinedVariable: Cannot find referenced variable $isBuiltinOrSelf

Check failure on line 85 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / sa / Psalm

UndefinedVariable: Cannot find referenced variable $isBuiltinOrSelf

Check failure on line 85 in src/TypeString.php

View workflow job for this annotation

GitHub Actions / sa / PHPStan

Undefined variable: $isBuiltinOrSelf
}
Expand Down

0 comments on commit 8c93232

Please sign in to comment.