-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
119 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: '#^Anonymous function should return Illuminate\\Database\\Eloquent\\Collection but returns Illuminate\\Support\\Collection\<int, object\>\.$#' | ||
identifier: return.type | ||
count: 1 | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
|
||
- | ||
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Builder\:\:forceDeleteReturning\(\)\.$#' | ||
identifier: method.notFound | ||
count: 1 | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
|
||
- | ||
message: '#^Call to protected method addTimestampsToUpsertValues\(\) of class Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>\.$#' | ||
identifier: method.protected | ||
count: 1 | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
|
||
- | ||
message: '#^Call to protected method addUpdatedAtColumn\(\) of class Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>\.$#' | ||
identifier: method.protected | ||
count: 1 | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
|
||
- | ||
message: '#^Call to protected method addUpdatedAtToUpsertColumns\(\) of class Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>\.$#' | ||
identifier: method.protected | ||
count: 1 | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
|
||
- | ||
message: '#^PHPDoc tag @var with type Illuminate\\Database\\Eloquent\\Builder is not subtype of native type \$this\(Tpetry\\PostgresqlEnhanced\\Eloquent\\Mixins\\BuilderReturning\)\.$#' | ||
identifier: varTag.nativeType | ||
count: 1 | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
|
||
- | ||
message: '#^Call to function method_exists\(\) with Tpetry\\PostgresqlEnhanced\\Query\\Grammar and ''setConnection'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 1 | ||
path: src/PostgresEnhancedConnection.php | ||
|
||
- | ||
message: '#^Call to function method_exists\(\) with Tpetry\\PostgresqlEnhanced\\Schema\\Grammars\\Grammar and ''setConnection'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 1 | ||
path: src/PostgresEnhancedConnection.php | ||
|
||
- | ||
message: '#^Call to function method_exists\(\) with \$this\(Tpetry\\PostgresqlEnhanced\\Query\\Builder\) and ''applyBeforeQueryCal…'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 7 | ||
path: src/Query/Builder.php | ||
|
||
- | ||
message: '#^Return type \(array\<int, string\>\) of method Tpetry\\PostgresqlEnhanced\\Schema\\Grammars\\Grammar\:\:compileAdd\(\) should be compatible with return type \(string\) of method Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar\:\:compileAdd\(\)$#' | ||
identifier: method.childReturnType | ||
count: 1 | ||
path: src/Schema/Grammars/Grammar.php | ||
|
||
- | ||
message: '#^Call to an undefined method Illuminate\\Database\\Migrations\\Migration\:\:timeoutDown\(\)\.$#' | ||
identifier: method.notFound | ||
count: 1 | ||
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php | ||
|
||
- | ||
message: '#^Call to an undefined method Illuminate\\Database\\Migrations\\Migration\:\:timeoutUp\(\)\.$#' | ||
identifier: method.notFound | ||
count: 1 | ||
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php | ||
|
||
- | ||
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Builder\<Tpetry\\PostgresqlEnhanced\\Tests\\Eloquent\\Example\>\:\:forceDeleteReturning\(\)\.$#' | ||
identifier: method.notFound | ||
count: 3 | ||
path: tests/Eloquent/BuilderReturningTest.php | ||
|
||
- | ||
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:24\) and ''timeout'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 2 | ||
path: tests/Migration/ZeroDowntimeMigrationTest.php | ||
|
||
- | ||
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:36\) and ''timeout'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 2 | ||
path: tests/Migration/ZeroDowntimeMigrationTest.php | ||
|
||
- | ||
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:45\) and ''timeout'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 2 | ||
path: tests/Migration/ZeroDowntimeMigrationTest.php | ||
|
||
- | ||
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:55\) and ''timeout'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 2 | ||
path: tests/Migration/ZeroDowntimeMigrationTest.php | ||
|
||
- | ||
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:66\) and ''timeout'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 2 | ||
path: tests/Migration/ZeroDowntimeMigrationTest.php | ||
|
||
- | ||
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:70\) and ''timeout'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 2 | ||
path: tests/Migration/ZeroDowntimeMigrationTest.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,9 @@ | ||
includes: | ||
- phpstan-extension.neon | ||
- phpstan-baseline.neon | ||
|
||
parameters: | ||
level: 5 | ||
paths: | ||
- src | ||
- tests | ||
ignoreErrors: | ||
# Laravel does not know of lateral joins and probably wouldn't merge a PR extending all join types with expressions | ||
- message: "#^Parameter \\#3 \\$table of method Illuminate\\\\Database\\\\Query\\\\Builder\\:\\:newJoinClause\\(\\) expects string, Illuminate\\\\Database\\\\Query\\\\Expression given\\.$#" | ||
path: src/Query/Builder.php | ||
# The eloquent builder mixin is calling protected methods because it's part of the builder object | ||
- message: "#^Call to protected method addTimestampsToUpsertValues\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder<Illuminate\\\\Database\\\\Eloquent\\\\Model>\\.$#" | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
- message: "#^Call to protected method addUpdatedAtToUpsertColumns\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder<Illuminate\\\\Database\\\\Eloquent\\\\Model>\\.$#" | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
- message: "#^Call to protected method addUpdatedAtColumn\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder<Illuminate\\\\Database\\\\Eloquent\\\\Model>\\.$#" | ||
path: src/Eloquent/Mixins/BuilderReturning.php | ||
# It's impossible to statically test whether a class uses an trait in PHPStan | ||
- message: "#^Call to an undefined method Illuminate\\\\Database\\\\Migrations\\\\Migration\\:\\:timeoutDown\\(\\)\\.$#" | ||
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php | ||
- message: "#^Call to an undefined method Illuminate\\\\Database\\\\Migrations\\\\Migration\\:\\:timeoutUp\\(\\)\\.$#" | ||
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php | ||
# The compileAdd() method should return a string which will be cast to an array. As two queries need to be generated an array is returned | ||
- message: "#^Return type \\(array\\<int, string\\>\\) of method Tpetry\\\\PostgresqlEnhanced\\\\Schema\\\\Grammars\\\\Grammar\\:\\:compileAdd\\(\\) should be compatible with return type \\(string\\) of method Illuminate\\\\Database\\\\Schema\\\\Grammars\\\\PostgresGrammar\\:\\:compileAdd\\(\\)$#" | ||
path: src/Schema/Grammars/Grammar.php |