Skip to content

Commit 9b1e6be

Browse files
authored
IBX-10507: Allowed nullable type declarations for method parameters across the codebase (#40)
1 parent ae9e2d7 commit 9b1e6be

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/bundle/DataCollector/TwigDataCollector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Symfony\Component\HttpFoundation\Request;
1212
use Symfony\Component\HttpFoundation\Response;
1313
use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface;
14+
use Throwable;
1415
use Twig\Environment;
1516
use Twig\Profiler\Profile;
1617

@@ -36,7 +37,7 @@ private function getTemplatePathRegistry()
3637
return $this->templatePathRegistry;
3738
}
3839

39-
public function collect(Request $request, Response $response, \Throwable $exception = null)
40+
public function collect(Request $request, Response $response, ?Throwable $exception = null)
4041
{
4142
parent::collect($request, $response, $exception);
4243
}

src/lib/Asset/AssetPathResolver.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@
1111

1212
class AssetPathResolver implements AssetPathResolverInterface
1313
{
14-
/**
15-
* @var array
16-
*/
14+
/** @var array */
1715
private $designPaths;
1816

19-
/**
20-
* @var string
21-
*/
17+
/** @var string */
2218
private $webRootDir;
2319

24-
/**
25-
* @var \Psr\Log\LoggerInterface
26-
*/
20+
/** @var \Psr\Log\LoggerInterface|null */
2721
private $logger;
2822

29-
public function __construct(array $designPaths, $webRootDir, LoggerInterface $logger = null)
23+
public function __construct(array $designPaths, $webRootDir, ?LoggerInterface $logger = null)
3024
{
3125
$this->designPaths = $designPaths;
3226
$this->webRootDir = $webRootDir;

0 commit comments

Comments
 (0)