Skip to content

Commit 3648f26

Browse files
committed
PHPStand baseline
1 parent b7cc9b0 commit 3648f26

5 files changed

Lines changed: 73 additions & 4 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"phpstan:baseline": [
118118
"bash -c \"rm -rf utils/phpstan-baseline/*.neon\"",
119119
"bash -c \"touch utils/phpstan-baseline/loader.neon\"",
120-
"phpstan analyse --ansi --generate-baseline=utils/phpstan-baseline/loader.neon",
120+
"phpstan analyse --ansi --memory-limit=512M --generate-baseline=utils/phpstan-baseline/loader.neon",
121121
"split-phpstan-baseline utils/phpstan-baseline/loader.neon"
122122
],
123123
"phpstan:check": "vendor/bin/phpstan analyse --verbose --ansi --memory-limit=512M",
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# total 8 errors
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Property CodeIgniter\\CLI\\BaseCommand\:\:\$description \(string\) in isset\(\) is not nullable\.$#'
7+
count: 1
8+
path: ../../system/CLI/BaseCommand.php
9+
10+
-
11+
message: '#^Property CodeIgniter\\CLI\\BaseCommand\:\:\$usage \(string\) in isset\(\) is not nullable\.$#'
12+
count: 1
13+
path: ../../system/CLI/BaseCommand.php
14+
15+
-
16+
message: '#^Property CodeIgniter\\CLI\\BaseCommand\:\:\$group \(string\) in isset\(\) is not nullable\.$#'
17+
count: 1
18+
path: ../../system/CLI/Commands.php
19+
20+
-
21+
message: '#^Property CodeIgniter\\Database\\BaseConnection\<mysqli,mysqli_result\>\:\:\$strictOn \(bool\) in isset\(\) is not nullable\.$#'
22+
count: 1
23+
path: ../../system/Database/MySQLi/Connection.php
24+
25+
-
26+
message: '#^Property CodeIgniter\\Database\\BaseConnection\<SQLite3,SQLite3Result\>\:\:\$password \(string\) in isset\(\) is not nullable\.$#'
27+
count: 1
28+
path: ../../system/Database/SQLite3/Connection.php
29+
30+
-
31+
message: '#^Property CodeIgniter\\CLI\\BaseCommand\:\:\$group \(string\) in isset\(\) is not nullable\.$#'
32+
count: 1
33+
path: ../../tests/system/Commands/BaseCommandTest.php
34+
35+
-
36+
message: '#^Property CodeIgniter\\Database\\BaseConnection\<object\|resource,object\|resource\>\:\:\$charset \(string\) in isset\(\) is not nullable\.$#'
37+
count: 1
38+
path: ../../tests/system/Database/BaseConnectionTest.php
39+
40+
-
41+
message: '#^Property CodeIgniter\\I18n\\TimeDifference\:\:\$days \(float\|int\) in isset\(\) is not nullable\.$#'
42+
count: 1
43+
path: ../../tests/system/I18n/TimeDifferenceTest.php

utils/phpstan-baseline/loader.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 2795 errors
1+
# total 2808 errors
22

33
includes:
44
- argument.type.neon
@@ -10,6 +10,7 @@ includes:
1010
- codeigniter.superglobalAccessAssign.neon
1111
- deadCode.unreachable.neon
1212
- empty.notAllowed.neon
13+
- isset.property.neon
1314
- method.alreadyNarrowedType.neon
1415
- method.childParameterType.neon
1516
- method.childReturnType.neon

utils/phpstan-baseline/method.alreadyNarrowedType.neon

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 22 errors
1+
# total 24 errors
22

33
parameters:
44
ignoreErrors:
@@ -22,6 +22,11 @@ parameters:
2222
count: 1
2323
path: ../../tests/system/CodeIgniterTest.php
2424

25+
-
26+
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
27+
count: 1
28+
path: ../../tests/system/Commands/BaseCommandTest.php
29+
2530
-
2631
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsBool\(\) with bool will always evaluate to true\.$#'
2732
count: 1
@@ -32,6 +37,11 @@ parameters:
3237
count: 2
3338
path: ../../tests/system/Config/FactoriesTest.php
3439

40+
-
41+
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
42+
count: 1
43+
path: ../../tests/system/Database/BaseConnectionTest.php
44+
3545
-
3646
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
3747
count: 2

utils/phpstan-baseline/nullCoalesce.property.neon

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 8 errors
1+
# total 11 errors
22

33
parameters:
44
ignoreErrors:
@@ -27,6 +27,21 @@ parameters:
2727
count: 1
2828
path: ../../system/Throttle/Throttler.php
2929

30+
-
31+
message: '#^Property CodeIgniter\\HomeTest\:\:\$session \(array\<int\|string, mixed\>\) on left side of \?\? is not nullable\.$#'
32+
count: 1
33+
path: ../../tests/system/HomeTest.php
34+
35+
-
36+
message: '#^Property CodeIgniter\\Test\\FeatureTestAutoRoutingImprovedTest\:\:\$session \(array\<int\|string, mixed\>\) on left side of \?\? is not nullable\.$#'
37+
count: 1
38+
path: ../../tests/system/Test/FeatureTestAutoRoutingImprovedTest.php
39+
40+
-
41+
message: '#^Property CodeIgniter\\Test\\FeatureTestTraitTest\:\:\$session \(array\<int\|string, mixed\>\) on left side of \?\? is not nullable\.$#'
42+
count: 1
43+
path: ../../tests/system/Test/FeatureTestTraitTest.php
44+
3045
-
3146
message: '#^Property CodeIgniter\\Test\\FilterTestTraitTest\:\:\$request \(CodeIgniter\\HTTP\\RequestInterface\) on left side of \?\?\= is not nullable\.$#'
3247
count: 1

0 commit comments

Comments
 (0)