Skip to content

Commit 5e872f1

Browse files
authored
Merge pull request #6 from garrettw/main
Fix for PHP 8.4: implicitly nullable type in TypeReflection::__construct()
2 parents 9847788 + d6465f8 commit 5e872f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Parameters/TypeReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class TypeReflection
2727
* @param string|null $class Class name this parameter type is used in.
2828
* Necessary for relative `self` and `parent` type hints.
2929
*/
30-
public function __construct(string $type, string $class = null)
30+
public function __construct(string $type, ?string $class = null)
3131
{
3232
if ($type === 'self' && empty($class)) {
3333
throw new InvalidArgumentException('Type `self` can only be used inside classes.');

0 commit comments

Comments
 (0)