1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-31 20:11:54 +02:00

[ticket/17496] Fix Implicitly marking parameters as nullable PHP deprecations

Also use union types consistently instead of question marks.
Fixed with php-cs-fixer.

PHPBB-17496
This commit is contained in:
rxu
2025-04-15 12:14:21 +07:00
parent bdbd0be548
commit 7d1ae5bf19
64 changed files with 113 additions and 113 deletions

View File

@@ -33,7 +33,7 @@ class factory
* @param string $phpbb_root_path Path to the phpbb root directory
* @param string $php_ext php file extension
*/
public function __construct(?service $cache, bool $use_cache, string $phpbb_root_path, string $php_ext)
public function __construct(service|null $cache, bool $use_cache, string $phpbb_root_path, string $php_ext)
{
$this->cache = $cache;
$this->use_cache = $use_cache;

View File

@@ -58,7 +58,7 @@ class finder
* @param string $cache_name The name of the cache variable, defaults to
* _ext_finder
*/
public function __construct(?service $cache, bool $use_cache, string $phpbb_root_path, string $php_ext, string $cache_name = '_ext_finder')
public function __construct(service|null $cache, bool $use_cache, string $phpbb_root_path, string $php_ext, string $cache_name = '_ext_finder')
{
$this->phpbb_root_path = $phpbb_root_path;
$this->cache = $cache;