-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from Art4/74-phpstan-level-8
Fix test code for PHPStan level 9
- Loading branch information
Showing
36 changed files
with
312 additions
and
175 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,78 @@ | ||
# SPDX-FileCopyrightText: 2015-2023 Artur Weigandt https://wlabs.de/kontakt | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
includes: | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
|
||
parameters: | ||
level: 8 | ||
level: 9 | ||
|
||
paths: | ||
- src/ | ||
- tests/ | ||
|
||
scanDirectories: | ||
- vendor | ||
|
||
treatPhpDocTypesAsCertain: false | ||
|
||
ignoreErrors: | ||
- | ||
message: "#^Class Art4\\\\JsonApiClient\\\\Helper\\\\AccessKey extends generic class SplStack but does not specify its types\\: TValue$#" | ||
message: "#^Constructor of class Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull has an unused parameter \\$data\\.$#" | ||
count: 1 | ||
path: src/Helper/AccessKey.php | ||
path: src/V1/ResourceNull.php | ||
# parameter is required by Art4\JsonApiClient\Element | ||
|
||
- | ||
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$data is never read, only written\\.$#" | ||
message: "#^Constructor of class Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull has an unused parameter \\$manager\\.$#" | ||
count: 1 | ||
path: src/V1/ResourceNull.php | ||
# parameter is required by Art4\JsonApiClient\Element | ||
|
||
- | ||
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$manager is never read, only written\\.$#" | ||
message: "#^Constructor of class Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull has an unused parameter \\$parent\\.$#" | ||
count: 1 | ||
path: src/V1/ResourceNull.php | ||
# parameter is required by Art4\JsonApiClient\Element | ||
|
||
- | ||
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$parent is never read, only written\\.$#" | ||
message: "#^Constructor of an anonymous class has an unused parameter \\$data\\.$#" | ||
count: 1 | ||
path: src/V1/ResourceNull.php | ||
path: tests/BC/ElementTest.php | ||
# parameter is required by Art4\JsonApiClient\Element | ||
|
||
- | ||
message: "#^Constructor of an anonymous class has an unused parameter \\$manager\\.$#" | ||
count: 1 | ||
path: tests/BC/ElementTest.php | ||
# parameter is required by Art4\JsonApiClient\Element | ||
|
||
- | ||
message: "#^Constructor of an anonymous class has an unused parameter \\$parent\\.$#" | ||
count: 1 | ||
path: tests/BC/ElementTest.php | ||
# parameter is required by Art4\JsonApiClient\Element | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of class Art4\\\\JsonApiClient\\\\Input\\\\RequestStringInput constructor expects string, mixed given\\.$#" | ||
count: 1 | ||
path: tests/Unit/Input/RequestStringInputTest.php | ||
# We are providing an invalid parameter to test the exception message | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of class Art4\\\\JsonApiClient\\\\Input\\\\ResponseStringInput constructor expects string, mixed given\\.$#" | ||
count: 1 | ||
path: tests/Unit/Input/ResponseStringInputTest.php | ||
# We are providing an invalid parameter to test the exception message | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$key of method Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:has\\(\\) expects Art4\\\\JsonApiClient\\\\Helper\\\\AccessKey\\|int\\|string, array given\\.$#" | ||
count: 1 | ||
path: tests/Unit/V1/ResourceNullTest.php | ||
# We are providing an invalid parameter to test the deprecation message | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$key of method Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:has\\(\\) expects Art4\\\\JsonApiClient\\\\Helper\\\\AccessKey\\|int\\|string, stdClass given\\.$#" | ||
count: 1 | ||
path: tests/Unit/V1/ResourceNullTest.php | ||
# We are providing an invalid parameter to test the deprecation message |
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
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
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
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
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
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
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
Oops, something went wrong.