1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-20 15:31:42 +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

@@ -66,7 +66,7 @@ class environment extends \Twig\Environment
* @param dispatcher_interface|null $phpbb_dispatcher Event dispatcher object
* @param array $options Array of options to pass to Twig
*/
public function __construct(assets_bag $assets_bag, config $phpbb_config, filesystem $filesystem, path_helper $path_helper, $cache_path, manager $extension_manager = null, LoaderInterface $loader = null, dispatcher_interface $phpbb_dispatcher = null, $options = array())
public function __construct(assets_bag $assets_bag, config $phpbb_config, filesystem $filesystem, path_helper $path_helper, $cache_path, manager|null $extension_manager = null, LoaderInterface|null $loader = null, dispatcher_interface|null $phpbb_dispatcher = null, $options = array())
{
$this->phpbb_config = $phpbb_config;
@@ -271,7 +271,7 @@ class environment extends \Twig\Environment
* @return \Twig\Template A template instance representing the given template name
* @throws \Twig\Error\LoaderError
*/
public function loadTemplate(string $cls, string $name, int $index = null) : \Twig\Template
public function loadTemplate(string $cls, string $name, int|null $index = null) : \Twig\Template
{
if (strpos($name, '@') === false)
{