From 1ee7fa30496eba67ec5eccc8bdabc9ca84b49132 Mon Sep 17 00:00:00 2001 From: Andy Postnikov Date: Tue, 30 Apr 2024 06:37:27 +0200 Subject: [PATCH] Fix PHP 8.4 deprecate-implicitly-nullable-types --- src/main/php/org/bovigo/vfs/vfsStream.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/php/org/bovigo/vfs/vfsStream.php b/src/main/php/org/bovigo/vfs/vfsStream.php index 1eb382df..575b3b93 100644 --- a/src/main/php/org/bovigo/vfs/vfsStream.php +++ b/src/main/php/org/bovigo/vfs/vfsStream.php @@ -208,7 +208,7 @@ public static function setup($rootDirName = 'root', $permissions = null, array $ * @see https://github.com/mikey179/vfsStream/issues/14 * @see https://github.com/mikey179/vfsStream/issues/20 */ - public static function create(array $structure, vfsStreamDirectory $baseDir = null) + public static function create(array $structure, ?vfsStreamDirectory $baseDir = null) { if (null === $baseDir) { $baseDir = vfsStreamWrapper::getRoot(); @@ -272,7 +272,7 @@ protected static function addStructure(array $structure, vfsStreamDirectory $bas * @since 0.11.0 * @see https://github.com/mikey179/vfsStream/issues/4 */ - public static function copyFromFileSystem($path, vfsStreamDirectory $baseDir = null, $maxFileSize = 1048576) + public static function copyFromFileSystem($path, ?vfsStreamDirectory $baseDir = null, $maxFileSize = 1048576) { if (null === $baseDir) { $baseDir = vfsStreamWrapper::getRoot(); @@ -421,7 +421,7 @@ public static function getCurrentGroup() * @since 0.10.0 * @see https://github.com/mikey179/vfsStream/issues/10 */ - public static function inspect(vfsStreamVisitor $visitor, vfsStreamContent $content = null) + public static function inspect(vfsStreamVisitor $visitor, ?vfsStreamContent $content = null) { if (null !== $content) { return $visitor->visit($content);