Skip to content

Commit 5b74cd2

Browse files
authored
Merge pull request codeigniter4#7291 from kenjis/fix-phpstan-1.10.1-errors
refactor: resolove PHPStan 1.10.1 errors
2 parents f6fb60d + d4e47a3 commit 5b74cd2

2 files changed

Lines changed: 1 addition & 25 deletions

File tree

phpstan-baseline.neon.dist

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ parameters:
2020
count: 1
2121
path: system/Cache/Handlers/FileHandler.php
2222

23-
-
24-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
25-
count: 1
26-
path: system/Cache/Handlers/MemcachedHandler.php
27-
2823
-
2924
message: "#^Property CodeIgniter\\\\Cache\\\\Handlers\\\\RedisHandler\\:\\:\\$redis \\(Redis\\) in isset\\(\\) is not nullable\\.$#"
3025
count: 1
@@ -50,16 +45,6 @@ parameters:
5045
count: 1
5146
path: system/Database/BaseConnection.php
5247

53-
-
54-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
55-
count: 2
56-
path: system/Database/BaseResult.php
57-
58-
-
59-
message: "#^While loop condition is always true\\.$#"
60-
count: 2
61-
path: system/Database/BaseResult.php
62-
6348
-
6449
message: "#^Access to an undefined property CodeIgniter\\\\Database\\\\ConnectionInterface\\:\\:\\$DBDriver\\.$#"
6550
count: 2
@@ -260,21 +245,11 @@ parameters:
260245
count: 1
261246
path: system/Router/Router.php
262247

263-
-
264-
message: "#^Strict comparison using \\=\\=\\= between string and true will always evaluate to false\\.$#"
265-
count: 1
266-
path: system/Session/Handlers/RedisHandler.php
267-
268248
-
269249
message: "#^Property CodeIgniter\\\\Session\\\\Session\\:\\:\\$sessionExpiration \\(int\\) in isset\\(\\) is not nullable\\.$#"
270250
count: 1
271251
path: system/Session/Session.php
272252

273-
-
274-
message: "#^Negated boolean expression is always false\\.$#"
275-
count: 1
276-
path: system/Test/CIUnitTestCase.php
277-
278253
-
279254
message: "#^Access to an undefined property object\\:\\:\\$createdField\\.$#"
280255
count: 1

system/Commands/Utilities/Routes/ControllerFinder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function find(): array
4444
$nsArray = explode('\\', trim($this->namespace, '\\'));
4545
$count = count($nsArray);
4646
$ns = '';
47+
$files = [];
4748

4849
for ($i = 0; $i < $count; $i++) {
4950
$ns .= '\\' . array_shift($nsArray);

0 commit comments

Comments
 (0)