Skip to content

Commit e522f23

Browse files
committed
maintenance: explicit nulls for phpstan
1 parent e977e0b commit e522f23

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/BaseRouter.php

+2-2
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/LogicStream/LogicStreamWrapper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private function loadContents(SplFileObject $file):void {
8383
if(str_starts_with($trimmedLine, "namespace")) {
8484
$foundNamespace = true;
8585
}
86-
elseif($trimmedLine ) {
86+
elseif($trimmedLine) {
8787
$namespace = new LogicStreamNamespace(
8888
$this->path,
8989
self::NAMESPACE_PREFIX

src/Path/DynamicPath.php

+1-1
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

+1-1
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)