Skip to content
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

Added baseline for static analyzers #543

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,72 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, string given\\.$#"
count: 1
path: src/Manager.php

-
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Pagination\\\\LengthAwarePaginator\\:\\:count\\(\\)\\.$#"
count: 1
path: src/Pagination/IlluminatePaginatorAdapter.php

-
message: "#^Call to an undefined method League\\\\Fractal\\\\Resource\\\\ResourceInterface\\:\\:getMeta\\(\\)\\.$#"
count: 1
path: src/Scope.php

-
message: "#^Call to an undefined method League\\\\Fractal\\\\TransformerAbstract\\:\\:transform\\(\\)\\.$#"
count: 2
path: src/Scope.php

-
message: "#^Call to function is_null\\(\\) with array will always evaluate to false\\.$#"
count: 1
path: src/Scope.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$includeKey\\)\\: Unexpected token \"\\$includeKey\", expected type at offset 18$#"
count: 2
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$includeObject\\)\\: Unexpected token \"\\$includeObject\", expected type at offset 18$#"
count: 1
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$includeObject\\)\\: Unexpected token \"\\$includeObject\", expected type at offset 73$#"
count: 1
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$includeObjects\\)\\: Unexpected token \"\\$includeObjects\", expected type at offset 18$#"
count: 1
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$key\\)\\: Unexpected token \"\\$key\", expected type at offset 102$#"
count: 1
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$linkedIds\\)\\: Unexpected token \"\\$linkedIds\", expected type at offset 48$#"
count: 1
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$relationship\\)\\: Unexpected token \"\\$relationship\", expected type at offset 47$#"
count: 1
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$relationships\\)\\: Unexpected token \"\\$relationships\", expected type at offset 44$#"
count: 2
path: src/Serializer/JsonApiSerializer.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$serializedData\\)\\: Unexpected token \"\\$serializedData\", expected type at offset 73$#"
count: 1
path: src/Serializer/JsonApiSerializer.php

24 changes: 23 additions & 1 deletion psalm.baseline.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.21.0@d8bec4c7aaee111a532daec32fb09de5687053d1"/>
<files psalm-version="4.22.0@fc2c6ab4d5fa5d644d8617089f012f3bb84b8703">
<file src="src/Pagination/DoctrinePaginatorAdapter.php">
<InvalidNullableReturnType occurrences="1">
<code>int</code>
</InvalidNullableReturnType>
<NullableReturnStatement occurrences="1">
<code>$this-&gt;paginator-&gt;getQuery()-&gt;getMaxResults()</code>
</NullableReturnStatement>
</file>
<file src="src/Pagination/IlluminatePaginatorAdapter.php">
<UndefinedInterfaceMethod occurrences="1">
<code>count</code>
</UndefinedInterfaceMethod>
</file>
<file src="src/Scope.php">
<UndefinedInterfaceMethod occurrences="1">
<code>getMeta</code>
</UndefinedInterfaceMethod>
<UndefinedMethod occurrences="1">
<code>transform</code>
</UndefinedMethod>
</file>
</files>