diff --git a/Command/ServerDumpPlaceholderCommand.php b/Command/ServerDumpPlaceholderCommand.php index 4402387..69ee83d 100644 --- a/Command/ServerDumpPlaceholderCommand.php +++ b/Command/ServerDumpPlaceholderCommand.php @@ -31,7 +31,7 @@ class ServerDumpPlaceholderCommand extends Command { private ServerDumpCommand $replacedCommand; - public function __construct(DumpServer $server = null, array $descriptors = []) + public function __construct(?DumpServer $server = null, array $descriptors = []) { $this->replacedCommand = new ServerDumpCommand((new \ReflectionClass(DumpServer::class))->newInstanceWithoutConstructor(), $descriptors); diff --git a/DebugBundle.php b/DebugBundle.php index 9782bf8..0af84fb 100644 --- a/DebugBundle.php +++ b/DebugBundle.php @@ -35,10 +35,10 @@ public function boot() // The dump data collector is used by default, so dump output is sent to // the WDT. In a CLI context, if dump is used too soon, the data collector // will buffer it, and release it at the end of the script. - VarDumper::setHandler(function ($var, string $label = null) use ($container) { + VarDumper::setHandler(function ($var, ?string $label = null) use ($container) { $dumper = $container->get('data_collector.dump'); $cloner = $container->get('var_dumper.cloner'); - $handler = function ($var, string $label = null) use ($dumper, $cloner) { + $handler = function ($var, ?string $label = null) use ($dumper, $cloner) { $var = $cloner->cloneVar($var); if (null !== $label) { $var = $var->withContext(['label' => $label]);