Skip to content

Commit fcab180

Browse files
committed
PHP 8.1 upgrades
1 parent dc86cac commit fcab180

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ImportResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class ImportResolver
2323
{
24-
private string $namespace;
24+
private readonly string $namespace;
2525

2626
/**
2727
* @var array<string, string>
@@ -95,7 +95,7 @@ private function invalidArgumentException(string $inferring, Reflector $reflecto
9595
return new InvalidArgumentException(sprintf(
9696
'Cannot infer the %s from the given %s',
9797
$inferring,
98-
get_class($reflector)
98+
$reflector::class
9999
));
100100
}
101101

src/ReflectionTools.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private function exportType(ReflectionType $type, bool $inUnion = false): string
254254
}
255255

256256
if (! $type instanceof ReflectionNamedType) {
257-
throw new Exception('Unsupported ReflectionType class: ' . get_class($type));
257+
throw new Exception('Unsupported ReflectionType class: ' . $type::class);
258258
}
259259

260260
$result = '';

0 commit comments

Comments
 (0)