Skip to content

Commit 424b2cb

Browse files
authored
Merge pull request #840 from paulbalandan/update-phpstan-codeigniter
chore: update phpstan-codeigniter to v1.3
2 parents a3030f9 + 804e449 commit 424b2cb

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"codeigniter4/settings": "^2.1"
3030
},
3131
"require-dev": {
32-
"codeigniter/phpstan-codeigniter": "^1.1",
32+
"codeigniter/phpstan-codeigniter": "^1.3",
3333
"codeigniter4/devkit": "^1.0",
3434
"codeigniter4/framework": "^4.2.7",
3535
"firebase/php-jwt": "^6.4",

phpstan-baseline.php

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
declare(strict_types=1);
1+
<?php declare(strict_types = 1);
42

53
$ignoreErrors = [];
64
$ignoreErrors[] = [
@@ -263,11 +261,31 @@
263261
'count' => 1,
264262
'path' => __DIR__ . '/src/Models/UserIdentityModel.php',
265263
];
264+
$ignoreErrors[] = [
265+
'message' => '#^Cannot unset offset \'email\' on array\\{username\\: string, status\\: string, status_message\\: string, active\\: bool, last_active\\: string, deleted_at\\: string\\}\\.$#',
266+
'count' => 1,
267+
'path' => __DIR__ . '/src/Models/UserModel.php',
268+
];
269+
$ignoreErrors[] = [
270+
'message' => '#^Cannot unset offset \'password_hash\' on array\\{username\\: string, status\\: string, status_message\\: string, active\\: bool, last_active\\: string, deleted_at\\: string\\}\\.$#',
271+
'count' => 1,
272+
'path' => __DIR__ . '/src/Models/UserModel.php',
273+
];
266274
$ignoreErrors[] = [
267275
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
268276
'count' => 2,
269277
'path' => __DIR__ . '/src/Models/UserModel.php',
270278
];
279+
$ignoreErrors[] = [
280+
'message' => '#^Offset \'email\' does not exist on array\\{username\\: string, status\\: string, status_message\\: string, active\\: bool, last_active\\: string, deleted_at\\: string\\}\\.$#',
281+
'count' => 1,
282+
'path' => __DIR__ . '/src/Models/UserModel.php',
283+
];
284+
$ignoreErrors[] = [
285+
'message' => '#^Offset \'password_hash\' does not exist on array\\{username\\: string, status\\: string, status_message\\: string, active\\: bool, last_active\\: string, deleted_at\\: string\\}\\.$#',
286+
'count' => 1,
287+
'path' => __DIR__ . '/src/Models/UserModel.php',
288+
];
271289
$ignoreErrors[] = [
272290
'message' => '#^Parameter \\#1 \\$data \\(array\\|CodeIgniter\\\\Shield\\\\Entities\\\\User\\) of method CodeIgniter\\\\Shield\\\\Models\\\\UserModel\\:\\:insert\\(\\) should be contravariant with parameter \\$data \\(array\\|object\\|null\\) of method CodeIgniter\\\\Model\\:\\:insert\\(\\)$#',
273291
'count' => 1,
@@ -343,16 +361,6 @@
343361
'count' => 1,
344362
'path' => __DIR__ . '/tests/Unit/UserTest.php',
345363
];
346-
$ignoreErrors[] = [
347-
'message' => '#^Cannot access property \\$active on array\\|object\\.$#',
348-
'count' => 2,
349-
'path' => __DIR__ . '/tests/Unit/UserTest.php',
350-
];
351-
$ignoreErrors[] = [
352-
'message' => '#^Cannot access property \\$password_hash on array\\|object\\.$#',
353-
'count' => 1,
354-
'path' => __DIR__ . '/tests/Unit/UserTest.php',
355-
];
356364
$ignoreErrors[] = [
357365
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
358366
'count' => 1,

0 commit comments

Comments
 (0)