Skip to content

Commit e2d0473

Browse files
authored
Merge pull request #18 from samsonasik/bump-phpstan-2
Bump to PHPStan 2
2 parents 1a9821c + 30b8bad commit e2d0473

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"require-dev": {
2727
"codeigniter/coding-standard": "^1.7.15",
2828
"codeigniter4/framework": "^4.5.1",
29-
"phpstan/phpstan": "^1.10.67",
29+
"phpstan/phpstan": "^2.0",
3030
"phpunit/phpunit": "^10.5.20",
3131
"rector/rector": "dev-main"
3232
},

phpstan.neon

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ parameters:
22
bootstrapFiles:
33
- bootstrap.php
44
inferPrivatePropertyTypeFromConstructor: true
5-
checkMissingIterableValueType: false
65
excludePaths:
76
- src/Config/*
87
- src/Database/*
98
- src/Views/*
109
ignoreErrors:
1110
- '#Access to protected property [a-zA-Z0-9\\_]+Model::\$returnType.#'
12-
- '#Call to an undefined static method Config\\Services::albumRepository\(\)#'
13-
- '#Call to an undefined static method Config\\Services::trackRepository\(\)#'
14-
- '#Call to an undefined static method Config\\Services::albumTrackSummary\(\)#'
1511
- '#Call to an undefined method CodeIgniter\\Model::get\(\)#'
12+
13+
-
14+
identifier: missingType.iterableValue
15+
16+
-
17+
identifier: method.nonObject
18+
path: src/Infrastructure/Persistence/Track/SQLTrackRepository.php

src/Controllers/Album.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
namespace Album\Controllers;
1313

14+
use Album\Config\Services;
1415
use Album\Domain\Album\AlbumRepository;
1516
use Album\Domain\Exception\RecordNotFoundException;
1617
use Album\Models\AlbumModel;
1718
use App\Controllers\BaseController;
1819
use CodeIgniter\Exceptions\PageNotFoundException;
1920
use CodeIgniter\HTTP\IncomingRequest;
2021
use CodeIgniter\HTTP\RedirectResponse;
21-
use Config\Services;
2222

2323
final class Album extends BaseController
2424
{

src/Controllers/AlbumTrackSummary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Album\Controllers;
1313

14+
use Album\Config\Services;
1415
use Album\Domain\AlbumTrackSummary\AlbumTrackSummaryRepository;
1516
use Album\Models\AlbumModel;
1617
use App\Controllers\BaseController;
17-
use Config\Services;
1818

1919
final class AlbumTrackSummary extends BaseController
2020
{

src/Controllers/Track.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Album\Controllers;
1313

14+
use Album\Config\Services;
1415
use Album\Domain\Album\AlbumRepository;
1516
use Album\Domain\Exception\DuplicatedRecordException;
1617
use Album\Domain\Exception\RecordNotFoundException;
@@ -20,7 +21,6 @@
2021
use CodeIgniter\Exceptions\PageNotFoundException;
2122
use CodeIgniter\HTTP\IncomingRequest;
2223
use CodeIgniter\HTTP\RedirectResponse;
23-
use Config\Services;
2424

2525
final class Track extends BaseController
2626
{

src/Domain/Album/Album.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
final class Album extends Entity
2222
{
2323
/**
24-
* @var array<string, null>|list<string>
24+
* @var array<string, mixed>
2525
*/
2626
protected $attributes = [
2727
'id' => null,

src/Domain/Track/Track.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
final class Track extends Entity
2323
{
2424
/**
25-
* @var array<string, null>|list<string>
25+
* @var array<string, mixed>
2626
*/
2727
protected $attributes = [
2828
'id' => null,

0 commit comments

Comments
 (0)