Skip to content

Commit 3e36e10

Browse files
committed
reduce phpstan ignore errors
1 parent 0ec154d commit 3e36e10

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ parameters:
3030
count: 1
3131
path: src/Listener/ForceHttpsFactory.php
3232

33-
-
34-
message: '#^Parameter \#1 \$config of class ForceHttpsModule\\Listener\\ForceHttps constructor expects array\<mixed\>, mixed given\.$#'
35-
identifier: argument.type
36-
count: 1
37-
path: src/Listener/ForceHttpsFactory.php
38-
3933
-
4034
message: '#^Cannot access offset ''enable'' on mixed\.$#'
4135
identifier: offsetAccess.nonOffsetAccessible
@@ -66,12 +60,6 @@ parameters:
6660
count: 1
6761
path: src/Middleware/ForceHttpsFactory.php
6862

69-
-
70-
message: '#^Parameter \#1 \$config of class ForceHttpsModule\\Middleware\\ForceHttps constructor expects array\<mixed\>, mixed given\.$#'
71-
identifier: argument.type
72-
count: 1
73-
path: src/Middleware/ForceHttpsFactory.php
74-
7563
-
7664
message: '#^Method ForceHttpsModule\\Module\:\:getConfig\(\) should return array\<mixed\> but returns mixed\.$#'
7765
identifier: return.type

src/Listener/ForceHttpsFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ForceHttpsFactory
1111
public function __invoke(ContainerInterface $container): ForceHttps
1212
{
1313
$config = $container->get('config');
14-
$forceHttpsConfig = $config['force-https-module'] ?? ['enable' => false];
14+
$forceHttpsConfig = (array) ($config['force-https-module'] ?? ['enable' => false]);
1515

1616
return new ForceHttps($forceHttpsConfig);
1717
}

src/Middleware/ForceHttpsFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function __invoke(ContainerInterface $container): ForceHttps
1414
$config = $container->get('config');
1515
/** @var RouterInterface $router */
1616
$router = $container->get(RouterInterface::class);
17-
$forceHttpsConfig = $config['force-https-module'] ?? ['enable' => false];
17+
$forceHttpsConfig = (array) ($config['force-https-module'] ?? ['enable' => false]);
1818

1919
return new ForceHttps($forceHttpsConfig, $router);
2020
}

0 commit comments

Comments
 (0)