Skip to content

Commit

Permalink
Fix the psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
glo71317 committed Nov 2, 2023
1 parent f3fd6a8 commit 00b65c7
Show file tree
Hide file tree
Showing 11 changed files with 282 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .idea/.gitignore

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

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

93 changes: 93 additions & 0 deletions .idea/laminas-session.iml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

117 changes: 117 additions & 0 deletions .idea/php.xml

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

10 changes: 10 additions & 0 deletions .idea/phpunit.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

25 changes: 25 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
<code><![CDATA[static fn() => $ts]]></code>
<code><![CDATA[static fn() => ['hops' => $hops, 'ts' => $ts]]]></code>
</TooManyArguments>
<MethodSignatureMustProvideReturnType occurrences="5">
<code>offsetSet</code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="src/AbstractManager.php">
<MixedMethodCall>
Expand Down Expand Up @@ -393,6 +396,9 @@
<PropertyNotSetInConstructor>
<code>Container</code>
</PropertyNotSetInConstructor>
<MethodSignatureMustProvideReturnType>
<code>offsetGet</code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="src/SaveHandler/Cache.php">
<ImplementedReturnTypeMismatch>
Expand Down Expand Up @@ -744,6 +750,10 @@
<TypeDoesNotContainType>
<code>is_object($input)</code>
</TypeDoesNotContainType>
<MethodSignatureMustProvideReturnType>
<code>serialize</code>
<code>unserialize</code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="src/Storage/ArrayStorage.php">
<ArgumentTypeCoercion>
Expand Down Expand Up @@ -863,6 +873,9 @@
<code>$_SESSION[$key]</code>
<code>$_SESSION[$key]</code>
</MixedArrayOffset>
<MethodSignatureMustProvideReturnType>
<code>offsetGet</code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="src/Storage/SessionStorage.php">
<InvalidArgument>
Expand Down Expand Up @@ -1006,6 +1019,14 @@
<code><![CDATA[$this->expectDeprecation();]]></code>
<code><![CDATA[$this->expectDeprecation();]]></code>
</UnevaluatedCode>
<UnusedMethodCall>
<code>setAccessible</code>
</UnusedMethodCall>
</file>
<file src="test/ReflectionPropertyTrait.php">
<UnusedMethodCall>
<code>setAccessible</code>
</UnusedMethodCall>
</file>
<file src="test/Config/StandardConfigTest.php">
<DeprecatedMethod>
Expand Down Expand Up @@ -1465,6 +1486,10 @@
<code>TestDbTableGatewaySaveHandler</code>
<code>TestDbTableGatewaySaveHandler</code>
</PropertyNotSetInConstructor>
<MethodSignatureMustProvideReturnType>
<code>read</code>
<code>destroy</code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="test/TestAsset/TestManager.php">
<ImplementedReturnTypeMismatch>
Expand Down
8 changes: 7 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>

<issueHandlers>
<DeprecatedClass>
<errorLevel type="suppress">
<referencedClass name="Laminas\ServiceManager\Config"/>
</errorLevel>
</DeprecatedClass>
</issueHandlers>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
Expand Down
1 change: 1 addition & 0 deletions src/SaveHandler/DbTableGatewayOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* DbTableGateway Save Handler Options
* @psalm-suppress MissingTemplateParam

Check failure on line 12 in src/SaveHandler/DbTableGatewayOptions.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 1 line between description and annotations, found 0.
*/
class DbTableGatewayOptions extends AbstractOptions
{
Expand Down
1 change: 1 addition & 0 deletions src/SaveHandler/MongoDBOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

/**
* MongoDB session save handler Options
* @psalm-suppress MissingTemplateParam

Check failure on line 16 in src/SaveHandler/MongoDBOptions.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 1 line between description and annotations, found 0.
*/
class MongoDBOptions extends AbstractOptions
{
Expand Down

0 comments on commit 00b65c7

Please sign in to comment.