Skip to content

Commit 16cb2b8

Browse files
committed
Update phpstan to 1.x
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 648a16e commit 16cb2b8

2 files changed

Lines changed: 55 additions & 20 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
"ext-dbase": "For dbf files parsing"
3737
},
3838
"require-dev": {
39-
"phpstan/phpstan": "^0.12.37",
39+
"phpstan/phpstan": "^1.10",
4040
"phpmyadmin/coding-standard": "^3.0.0",
41-
"phpstan/phpstan-phpunit": "^0.12.6",
41+
"phpstan/phpstan-phpunit": "^1.3",
4242
"phpunit/phpunit": "^7.4 || ^8 || ^9"
4343
},
4444
"autoload": {

phpstan-baseline.neon

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Parameter \\#1 \\$fp of function feof expects resource, resource\\|false given\\.$#"
4+
message: "#^Parameter \\#1 \\$file of method PhpMyAdmin\\\\ShapeFile\\\\ShapeFile\\:\\:saveBBox\\(\\) expects resource, resource\\|null given\\.$#"
5+
count: 2
6+
path: src/ShapeFile.php
7+
8+
-
9+
message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
510
count: 1
611
path: src/ShapeFile.php
712

813
-
9-
message: "#^Parameter \\#1 \\$fp of function fread expects resource, resource\\|false given\\.$#"
14+
message: "#^Parameter \\#1 \\$fp of function feof expects resource, resource\\|false given\\.$#"
1015
count: 1
1116
path: src/ShapeFile.php
1217

1318
-
14-
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
15-
count: 6
19+
message: "#^Parameter \\#1 \\$fp of function feof expects resource, resource\\|null given\\.$#"
20+
count: 1
1621
path: src/ShapeFile.php
1722

1823
-
19-
message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
24+
message: "#^Parameter \\#1 \\$fp of function fread expects resource, resource\\|false given\\.$#"
2025
count: 1
2126
path: src/ShapeFile.php
2227

@@ -26,27 +31,32 @@ parameters:
2631
path: src/ShapeFile.php
2732

2833
-
29-
message: "#^Parameter \\#1 \\$file of method PhpMyAdmin\\\\ShapeFile\\\\ShapeFile\\:\\:saveBBox\\(\\) expects resource, resource\\|null given\\.$#"
30-
count: 2
34+
message: "#^Parameter \\#1 \\$str of function strtoupper expects string, mixed given\\.$#"
35+
count: 1
3136
path: src/ShapeFile.php
3237

3338
-
34-
message: "#^Result of && is always false\\.$#"
35-
count: 1
39+
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
40+
count: 6
3641
path: src/ShapeFile.php
3742

3843
-
39-
message: "#^Result of \\|\\| is always false\\.$#"
44+
message: "#^Parameter \\#1 \\$type of static method PhpMyAdmin\\\\ShapeFile\\\\Util\\:\\:nameShape\\(\\) expects int, int\\|false given\\.$#"
4045
count: 1
4146
path: src/ShapeFile.php
4247

4348
-
44-
message: "#^Strict comparison using \\=\\=\\= between int and '' will always evaluate to false\\.$#"
49+
message: "#^Parameter \\#2 \\$length of function fread expects int\\<0, max\\>, int given\\.$#"
4550
count: 1
4651
path: src/ShapeFile.php
4752

4853
-
49-
message: "#^Strict comparison using \\=\\=\\= between int and false will always evaluate to false\\.$#"
54+
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeFile\\:\\:\\$dbfFile \\(resource\\|null\\) does not accept resource\\|false\\.$#"
55+
count: 2
56+
path: src/ShapeFile.php
57+
58+
-
59+
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeFile\\:\\:\\$shapeType \\(int\\|false\\) does not accept mixed\\.$#"
5060
count: 1
5161
path: src/ShapeFile.php
5262

@@ -61,24 +71,24 @@ parameters:
6171
path: src/ShapeFile.php
6272

6373
-
64-
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeFile\\:\\:\\$dbfFile \\(resource\\|null\\) does not accept resource\\|false\\.$#"
65-
count: 2
74+
message: "#^Result of && is always false\\.$#"
75+
count: 1
6676
path: src/ShapeFile.php
6777

6878
-
69-
message: "#^Parameter \\#1 \\$fp of function feof expects resource, resource\\|null given\\.$#"
79+
message: "#^Result of \\|\\| is always false\\.$#"
7080
count: 1
7181
path: src/ShapeFile.php
7282

7383
-
74-
message: "#^Parameter \\#1 \\$type of static method PhpMyAdmin\\\\ShapeFile\\\\Util\\:\\:nameShape\\(\\) expects int, int\\|false given\\.$#"
84+
message: "#^Strict comparison using \\=\\=\\= between int and '' will always evaluate to false\\.$#"
7585
count: 1
7686
path: src/ShapeFile.php
7787

7888
-
79-
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeRecord\\:\\:\\$shapeType \\(int\\) does not accept false\\.$#"
89+
message: "#^Strict comparison using \\=\\=\\= between int and false will always evaluate to false\\.$#"
8090
count: 1
81-
path: src/ShapeRecord.php
91+
path: src/ShapeFile.php
8292

8393
-
8494
message: "#^Parameter \\#2 \\$record_number of function dbase_get_record_with_names expects int, int\\|null given\\.$#"
@@ -90,3 +100,28 @@ parameters:
90100
count: 1
91101
path: src/ShapeRecord.php
92102

103+
-
104+
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeRecord\\:\\:\\$dbfFile \\(resource\\) in isset\\(\\) is not nullable\\.$#"
105+
count: 1
106+
path: src/ShapeRecord.php
107+
108+
-
109+
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeRecord\\:\\:\\$recordNumber \\(int\\|null\\) does not accept mixed\\.$#"
110+
count: 1
111+
path: src/ShapeRecord.php
112+
113+
-
114+
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeRecord\\:\\:\\$shapeType \\(int\\) does not accept false\\.$#"
115+
count: 1
116+
path: src/ShapeRecord.php
117+
118+
-
119+
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeRecord\\:\\:\\$shapeType \\(int\\) does not accept mixed\\.$#"
120+
count: 1
121+
path: src/ShapeRecord.php
122+
123+
-
124+
message: "#^Property PhpMyAdmin\\\\ShapeFile\\\\ShapeRecord\\:\\:\\$size \\(int\\) does not accept mixed\\.$#"
125+
count: 1
126+
path: src/ShapeRecord.php
127+

0 commit comments

Comments
 (0)