Skip to content

Commit 8d92e83

Browse files
committed
maintenance: explicit nullables
1 parent 74f83ab commit 8d92e83

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/BaseRouter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ abstract class BaseRouter {
2626

2727
public function __construct(
2828
protected ?ConfigSection $routerConfig = null,
29-
Assembly $viewAssembly = null,
30-
Assembly $logicAssembly = null,
29+
?Assembly $viewAssembly = null,
30+
?Assembly $logicAssembly = null,
3131
) {
3232
$this->viewAssembly = $viewAssembly ?? new Assembly();
3333
$this->logicAssembly = $logicAssembly ?? new Assembly();

src/Path/DynamicPath.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function __construct(
1414
$this->assemblyList = $assemblyList;
1515
}
1616

17-
public function get(string $key = null, bool $extra = false):?string {
17+
public function get(?string $key = null, bool $extra = false):?string {
1818
$requestPathParts = explode("/", $this->requestPath);
1919

2020
foreach($this->assemblyList as $assembly) {

src/Path/PathMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class PathMatcher {
88

99
public function __construct(
1010
private string $baseDirectory,
11-
DirectoryExpander $expander = null
11+
?DirectoryExpander $expander = null
1212
) {
1313
$this->expander = $expander ?? new DirectoryExpander();
1414
$this->filterArray = [];

0 commit comments

Comments
 (0)