Skip to content

Commit

Permalink
Upgraded to PHPstan 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Nov 11, 2024
1 parent 13fef8d commit b7eb83f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"require-dev": {
"phpunit/phpunit": "^11.4",
"mockery/mockery": "^1.6.12",
"phpstan/phpstan": "^1.12.7"
"phpstan/phpstan": "^2.0.0"
},
"prefer-stable": true,
"minimum-stability": "dev",
Expand Down
12 changes: 4 additions & 8 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Variable \\$start might not be defined\\.$#"
count: 1
path: src/mako/database/connections/Connection.php
-
message: "#^Call to an undefined method mako\\\\database\\\\midgard\\\\ResultSet<TKey of \\(int\\|string\\), TValue of mako\\\\database\\\\midgard\\\\ORM>\\:\\:including\\(\\)\\.$#"
count: 1
Expand All @@ -20,10 +16,6 @@ parameters:
message: "#Access to an undefined property mako\\\\error\\\\handlers\\\\web\\\\Handler::\\$response\\.#"
count: 1
path: src/mako/http/traits/ContentNegotiationTrait.php
-
message: "#^Creating callable from a non-native method stdClass::(beforeAction|afterAction)()#"
count: 2
path: src/mako/http/routing/Dispatcher.php
-
message: "#^PHPDoc tag @return with type mako\\\\utility\\\\Collection<int, mako\\\\utility\\\\Collection<int, TValue>> is incompatible with native type static\\(mako\\\\utility\\\\Collection<TKey of \\(int\\|string\\), TValue>\\)\\.$#"
count: 1
Expand All @@ -48,3 +40,7 @@ parameters:
message: "#^Call to protected method orderMiddlewareByPriority\\(\\) of class mako\\\\http\\\\routing\\\\Dispatcher\\.$#"
count: 1
path: src/mako/application/cli/commands/app/ListRoutes.php
-
message: "#^PHPDoc tag @var with type mako\\\\http\\\\routing\\\\Dispatcher is not subtype of native type \\$this\\(mako\\\\application\\\\cli\\\\commands\\\\app\\\\ListRoutes\\)\\.$#"
count: 1
path: src/mako/application/cli/commands/app/ListRoutes.php
4 changes: 2 additions & 2 deletions src/mako/gatekeeper/adapters/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
/**
* Base adapter.
*
* @method mako\gatekeeper\repositories\group\GroupRepository getGroupRepository()
* @method mako\gatekeeper\repositories\user\UserRepository getUserRepository()
* @method \mako\gatekeeper\repositories\group\GroupRepository getGroupRepository()
* @method \mako\gatekeeper\repositories\user\UserRepository getUserRepository()
*/
abstract class Adapter implements AdapterInterface, WithGroupsInterface, WithLoginInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/mako/gatekeeper/entities/group/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
* @method int getId()
* @property int $id
* @property \mako\utility\Time $created_at
* @property \mako\utility\Time $updated_at
* @property \mako\chrono\Time $created_at
* @property \mako\chrono\Time $updated_at
* @property string $name
* @property \mako\database\midgard\ResultSet $users
*/
Expand Down

0 comments on commit b7eb83f

Please sign in to comment.