Skip to content

Commit ab6d83b

Browse files
committed
Fix PHP 8.4 tests compatibility
1 parent bda7a5f commit ab6d83b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/CompatibilityTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ public function testSourceFactoryCompatibility(): void
8282

8383
new class () implements SourceFactoryInterface {
8484
public function create($source): ReadableInterface {}
85-
public function createFromString(string $content = '', string $name = null): ReadableInterface {}
85+
public function createFromString(string $content = '', ?string $name = null): ReadableInterface {}
8686
public function createFromFile(string $filename): FileInterface {}
87-
public function createFromStream($stream, string $name = null): ReadableInterface {}
87+
public function createFromStream($stream, ?string $name = null): ReadableInterface {}
8888
};
8989
}
9090

@@ -97,9 +97,9 @@ public function testSourceFactoryWithMixedCompatibility(): void
9797

9898
new class () implements SourceFactoryInterface {
9999
public function create(mixed $source): ReadableInterface {}
100-
public function createFromString(string $content = '', string $name = null): ReadableInterface {}
100+
public function createFromString(string $content = '', ?string $name = null): ReadableInterface {}
101101
public function createFromFile(string $filename): FileInterface {}
102-
public function createFromStream(mixed $stream, string $name = null): ReadableInterface {}
102+
public function createFromStream(mixed $stream, ?string $name = null): ReadableInterface {}
103103
};
104104
}
105105
}

0 commit comments

Comments
 (0)