Skip to content

Commit

Permalink
Update psalm
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksei Khudiakov <[email protected]>
  • Loading branch information
Xerkus committed Dec 1, 2023
1 parent 1850f63 commit 9d5b08a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/.phpcs-cache
/.phpunit.result.cache
/.psalm-cache
/docs/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/
/.phpunit.result.cache
.phpcs-cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"laminas/laminas-coding-standard": "~2.5.0",
"phpunit/phpunit": "^9.5.26",
"psalm/plugin-phpunit": "^0.18.0",
"vimeo/psalm": "^5.0.0"
"vimeo/psalm": "^5.16"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 27 additions & 16 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.24.0@06dd975cb55d36af80f242561738f16c5f58264f">
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
<file src="src/Module.php">
<UnusedClass>
<code>Module</code>
</UnusedClass>
</file>
<file src="src/PostRedirectGet.php">
<DocblockTypeContradiction occurrences="1">
<DocblockTypeContradiction>
<code>null === $redirect</code>
</DocblockTypeContradiction>
<MixedArgument occurrences="2">
<MixedArgument>
<code>$redirect</code>
<code>$redirect</code>
</MixedArgument>
<MixedAssignment occurrences="4">
<MixedAssignment>
<code>$post</code>
<code>$redirect</code>
<code>$request</code>
<code>$routeMatch</code>
</MixedAssignment>
<MixedInferredReturnType occurrences="2">
<MixedInferredReturnType>
<code>Redirect</code>
<code>Response|array|Traversable|false</code>
</MixedInferredReturnType>
<MixedMethodCall occurrences="7">
<MixedMethodCall>
<code>fromQuery</code>
<code>get</code>
<code>getMatchedRouteName</code>
Expand All @@ -27,29 +32,35 @@
<code>isPost</code>
<code>toArray</code>
</MixedMethodCall>
<MixedReturnStatement occurrences="2">
<code>$controller-&gt;getPluginManager()-&gt;get('Redirect')</code>
<MixedReturnStatement>
<code><![CDATA[$controller->getPluginManager()->get('Redirect')]]></code>
<code>$post</code>
</MixedReturnStatement>
<PossiblyNullArgument occurrences="2">
<PossiblyNullArgument>
<code>$controller</code>
<code>$redirect</code>
</PossiblyNullArgument>
<PossiblyNullReference occurrences="4">
<PossiblyNullReference>
<code>getEvent</code>
<code>getRequest</code>
<code>getRequest</code>
<code>params</code>
</PossiblyNullReference>
<UndefinedInterfaceMethod occurrences="4">
<PossiblyUnusedMethod>
<code>setSessionContainer</code>
</PossiblyUnusedMethod>
<UndefinedInterfaceMethod>
<code>getEvent</code>
<code>getRequest</code>
<code>getRequest</code>
<code>params</code>
</UndefinedInterfaceMethod>
</file>
<file src="test/PostRedirectGetTest.php">
<PossiblyInvalidMethodCall occurrences="7">
<InvalidArgument>
<code>$router</code>
</InvalidArgument>
<PossiblyInvalidMethodCall>
<code>getUri</code>
<code>getUri</code>
<code>getUri</code>
Expand All @@ -58,15 +69,15 @@
<code>getUri</code>
<code>getUri</code>
</PossiblyInvalidMethodCall>
<PossiblyNullArgument occurrences="2">
<PossiblyNullArgument>
<code>$routeMatch</code>
<code>$routeMatch</code>
</PossiblyNullArgument>
<PossiblyNullReference occurrences="2">
<PossiblyNullReference>
<code>setMatchedRouteName</code>
<code>setMatchedRouteName</code>
</PossiblyNullReference>
<UndefinedMethod occurrences="7">
<UndefinedMethod>
<code>getUri</code>
<code>getUri</code>
<code>getUri</code>
Expand All @@ -75,7 +86,7 @@
<code>getUri</code>
<code>getUri</code>
</UndefinedMethod>
<UnusedVariable occurrences="2">
<UnusedVariable>
<code>$controller</code>
<code>$prgResultRoute</code>
</UnusedVariable>
Expand Down
6 changes: 5 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
cacheDirectory="./.psalm-cache"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorLevel="1"
findUnusedPsalmSuppress="true"
findUnusedCode="true"
findUnusedBaselineEntry="true"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
Expand Down

0 comments on commit 9d5b08a

Please sign in to comment.