Skip to content

Commit

Permalink
Merge pull request #18 from samsonasik/bump-phpstan-2
Browse files Browse the repository at this point in the history
Bump to PHPStan 2
  • Loading branch information
samsonasik authored Nov 20, 2024
2 parents 1a9821c + 30b8bad commit e2d0473
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require-dev": {
"codeigniter/coding-standard": "^1.7.15",
"codeigniter4/framework": "^4.5.1",
"phpstan/phpstan": "^1.10.67",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^10.5.20",
"rector/rector": "dev-main"
},
Expand Down
11 changes: 7 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ parameters:
bootstrapFiles:
- bootstrap.php
inferPrivatePropertyTypeFromConstructor: true
checkMissingIterableValueType: false
excludePaths:
- src/Config/*
- src/Database/*
- src/Views/*
ignoreErrors:
- '#Access to protected property [a-zA-Z0-9\\_]+Model::\$returnType.#'
- '#Call to an undefined static method Config\\Services::albumRepository\(\)#'
- '#Call to an undefined static method Config\\Services::trackRepository\(\)#'
- '#Call to an undefined static method Config\\Services::albumTrackSummary\(\)#'
- '#Call to an undefined method CodeIgniter\\Model::get\(\)#'

-
identifier: missingType.iterableValue

-
identifier: method.nonObject
path: src/Infrastructure/Persistence/Track/SQLTrackRepository.php
2 changes: 1 addition & 1 deletion src/Controllers/Album.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

namespace Album\Controllers;

use Album\Config\Services;
use Album\Domain\Album\AlbumRepository;
use Album\Domain\Exception\RecordNotFoundException;
use Album\Models\AlbumModel;
use App\Controllers\BaseController;
use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\RedirectResponse;
use Config\Services;

final class Album extends BaseController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/AlbumTrackSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

namespace Album\Controllers;

use Album\Config\Services;
use Album\Domain\AlbumTrackSummary\AlbumTrackSummaryRepository;
use Album\Models\AlbumModel;
use App\Controllers\BaseController;
use Config\Services;

final class AlbumTrackSummary extends BaseController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/Track.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Album\Controllers;

use Album\Config\Services;
use Album\Domain\Album\AlbumRepository;
use Album\Domain\Exception\DuplicatedRecordException;
use Album\Domain\Exception\RecordNotFoundException;
Expand All @@ -20,7 +21,6 @@
use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\RedirectResponse;
use Config\Services;

final class Track extends BaseController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Album/Album.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
final class Album extends Entity
{
/**
* @var array<string, null>|list<string>
* @var array<string, mixed>
*/
protected $attributes = [
'id' => null,
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Track/Track.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
final class Track extends Entity
{
/**
* @var array<string, null>|list<string>
* @var array<string, mixed>
*/
protected $attributes = [
'id' => null,
Expand Down

0 comments on commit e2d0473

Please sign in to comment.