-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require phpstan/phpstan
2
#17
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
11de213
Use PHPStan 2
OskarStark bb1bba4
-
OskarStark 030016d
-
OskarStark 7cce885
-
OskarStark eb8dd4f
Allow `thecodingmachine/safe` 3 (#18)
OskarStark a0b5ac2
-
OskarStark 16f7dbc
-
OskarStark df0ae47
-
OskarStark 268ef19
-
OskarStark 684e3ee
-
OskarStark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,82 +1,110 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:assetResponse\\(\\) should return array\\{asset\\: array\\{filename\\: string, created_at\\: string, updated_at\\: string, expire_at\\: string\\|null, content_length\\: int, signed_url\\: string, content_type\\: string\\}\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Domain\\Value\\Datasource\:\:\$dimensions \(list\<Storyblok\\Api\\Domain\\Value\\DatasourceDimension\>\) does not accept array\<Storyblok\\Api\\Domain\\Value\\DatasourceDimension\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/Datasource.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:datasourceDimensionResponse\\(\\) should return array\\{id\\: int, name\\: string, entry_value\\: string, datasource_id\\: int, created_at\\: string, updated_at\\: string\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Domain\\Value\\Field\\FieldCollection\:\:\$items \(list\<Storyblok\\Api\\Domain\\Value\\Field\\Field\>\) does not accept array\<int\<0, max\>, Storyblok\\Api\\Domain\\Value\\Field\\Field\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/Field/FieldCollection.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:datasourceEntriesResponse\\(\\) should return array\\{datasource_entries\\: array\\<int, array\\{id\\: int, name\\: string, value\\: string, dimension_value\\: string\\|null\\}\\>\\} but returns array\\.$#" | ||
message: '#^PHPDoc tag @return contains unresolvable type\.$#' | ||
identifier: return.unresolvableType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/Filter/FilterCollection.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:datasourceEntryResponse\\(\\) should return array\\{id\\: int, name\\: string, value\\: string, dimension_value\\: string\\|null\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Domain\\Value\\Filter\\FilterCollection\:\:\$items \(list\<Storyblok\\Api\\Domain\\Value\\Filter\\Filters\\Filter\>\) does not accept array\<int\<0, max\>, Storyblok\\Api\\Domain\\Value\\Filter\\Filters\\Filter\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/Filter/FilterCollection.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:datasourceResponse\\(\\) should return array\\{id\\: int, name\\: string, slug\\: string, dimensions\\: array\\<int, array\\{id\\: int, name\\: string, entry_value\\: string, datasource_id\\: int, created_at\\: string, updated_at\\: string\\}\\>\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Domain\\Value\\IdCollection\:\:\$items \(list\<Storyblok\\Api\\Domain\\Value\\Id\>\) does not accept array\<int\<0, max\>, Storyblok\\Api\\Domain\\Value\\Id\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/IdCollection.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:datasourcesResponse\\(\\) should return array\\{datasources\\: array\\<int, array\\<string, mixed\\>\\>\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Domain\\Value\\Link\:\:\$alternates \(list\<Storyblok\\Api\\Domain\\Value\\LinkAlternate\>\) does not accept array\<Storyblok\\Api\\Domain\\Value\\LinkAlternate\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/Link.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:linkAlternateResponse\\(\\) should return array\\{lang\\: string, name\\: string, path\\: string, published\\: bool, translated_slug\\: string\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Domain\\Value\\Resolver\\RelationCollection\:\:\$items \(list\<Storyblok\\Api\\Domain\\Value\\Resolver\\Relation\>\) does not accept array\<int\<0, max\>, Storyblok\\Api\\Domain\\Value\\Resolver\\Relation\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/Resolver/RelationCollection.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:linkResponse\\(\\) should return array\\{uuid\\: string, id\\: int, parent_id\\: int\\|null, name\\: string, slug\\: string, path\\: string, real_path\\: string, is_folder\\: bool, \\.\\.\\.\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Domain\\Value\\Tag\\TagCollection\:\:\$items \(list\<Storyblok\\Api\\Domain\\Value\\Tag\\Tag\>\) does not accept array\<int\<0, max\>, Storyblok\\Api\\Domain\\Value\\Tag\\Tag\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Domain/Value/Tag/TagCollection.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:linksResponse\\(\\) should return array\\{links\\: array\\<int, array\\<string, mixed\\>\\>\\} but returns array\\.$#" | ||
message: '#^Method Storyblok\\Api\\Request\\StoriesRequest\:\:toArray\(\) should return array\{language\: string, page\: int, per_page\: int, sort_by\?\: string, filter_query\?\: list\<mixed\>, with_tag\?\: string, excluding_fields\?\: string, excluding_ids\?\: string, \.\.\.\} but returns array\{language\: string, page\: int, per_page\: int, sort_by\?\: string, filter_query\?\: array, with_tag\?\: string, excluding_fields\?\: string, excluding_ids\?\: string, \.\.\.\}\.$#' | ||
identifier: return.type | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Request/StoriesRequest.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:spaceResponse\\(\\) should return array\\{id\\: int, name\\: string, domain\\: string, version\\: int, language_codes\\: array\\<int, string\\>\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Response\\DatasourceEntriesResponse\:\:\$datasourceEntries \(list\<Storyblok\\Api\\Domain\\Value\\DatasourceEntry\>\) does not accept array\<Storyblok\\Api\\Domain\\Value\\DatasourceEntry\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Response/DatasourceEntriesResponse.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:storiesResponse\\(\\) should return array\\{cv\\: int, stories\\: array\\<int, array\\<string, mixed\\>\\>, links\\: array\\<string\\>, rels\\: array\\<string\\>\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Response\\DatasourcesResponse\:\:\$datasources \(list\<Storyblok\\Api\\Domain\\Value\\Datasource\>\) does not accept array\<Storyblok\\Api\\Domain\\Value\\Datasource\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Response/DatasourcesResponse.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:storyResponse\\(\\) should return array\\{cv\\: int, story\\: array\\<string, mixed\\>, links\\: array\\<string\\>, rels\\: array\\<string\\>\\} but returns array\\.$#" | ||
message: '#^Property Storyblok\\Api\\Response\\TagsResponse\:\:\$tags \(list\<Storyblok\\Api\\Domain\\Value\\Tag\>\) does not accept array\<Storyblok\\Api\\Domain\\Value\\Tag\>\.$#' | ||
identifier: assign.propertyType | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: src/Response/TagsResponse.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Bridge\\\\Faker\\\\Provider\\\\StoryblokProvider\\:\\:tagsResponse\\(\\) should return array\\{tags\\: array\\<int, array\\{name\\: string, taggings_count\\: int\\}\\>\\} but returns array\\.$#" | ||
message: '#^Cannot call method format\(\) on DateTimeImmutable\|null\.$#' | ||
identifier: method.nonObject | ||
count: 1 | ||
path: src/Bridge/Faker/Provider/StoryblokProvider.php | ||
path: tests/Unit/Domain/Value/AssetTest.php | ||
|
||
- | ||
message: "#^Method Storyblok\\\\Api\\\\Domain\\\\Value\\\\Filter\\\\FilterCollection\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Domain/Value/Filter/FilterCollection.php | ||
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertEmpty\(\) with Storyblok\\Api\\Domain\\Value\\Field\\FieldCollection will always evaluate to false\.$#' | ||
identifier: staticMethod.impossibleType | ||
count: 2 | ||
path: tests/Unit/Domain/Value/Field/FieldCollectionTest.php | ||
|
||
- | ||
message: "#^PHPDoc tag @return contains unresolvable type\\.$#" | ||
count: 1 | ||
path: src/Domain/Value/Filter/FilterCollection.php | ||
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertEmpty\(\) with Storyblok\\Api\\Domain\\Value\\Filter\\FilterCollection will always evaluate to false\.$#' | ||
identifier: staticMethod.impossibleType | ||
count: 2 | ||
path: tests/Unit/Domain/Value/Filter/FilterCollectionTest.php | ||
|
||
- | ||
message: "#^Cannot call method format\\(\\) on DateTimeImmutable\\|null\\.$#" | ||
count: 1 | ||
path: tests/Unit/Domain/Value/AssetTest.php | ||
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertEmpty\(\) with Storyblok\\Api\\Domain\\Value\\IdCollection will always evaluate to false\.$#' | ||
identifier: staticMethod.impossibleType | ||
count: 2 | ||
path: tests/Unit/Domain/Value/IdCollectionTest.php | ||
|
||
- | ||
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertEmpty\(\) with Storyblok\\Api\\Domain\\Value\\Resolver\\RelationCollection will always evaluate to false\.$#' | ||
identifier: staticMethod.impossibleType | ||
count: 2 | ||
path: tests/Unit/Domain/Value/Resolver/RelationCollectionTest.php | ||
|
||
- | ||
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertEmpty\(\) with Storyblok\\Api\\Domain\\Value\\Tag\\TagCollection will always evaluate to false\.$#' | ||
identifier: staticMethod.impossibleType | ||
count: 2 | ||
path: tests/Unit/Domain/Value/Tag/TagCollectionTest.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
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ public function __construct( | |
} | ||
|
||
/** | ||
* @param array<string, list<string>> $headers | ||
* @param array<string, array<string>> $headers | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes some errors, but I am in favor of keeping the |
||
*/ | ||
public static function fromHeaders(array $headers): self | ||
{ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a false positive, otherwise our test would fail