Skip to content

Commit

Permalink
Added baseline for static analyzers (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm authored Mar 7, 2022
1 parent ef87034 commit f560f36
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
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>

0 comments on commit f560f36

Please sign in to comment.