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 0896ebc commit 2511842
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
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 @@ -682,6 +688,10 @@
</TypeDoesNotContainType>
</file>
<file src="src/Storage/AbstractSessionArrayStorage.php">
<MethodSignatureMustProvideReturnType occurrences="2">
<code>serialize</code>
<code>unserialize</code>
</MethodSignatureMustProvideReturnType>
<InvalidReturnStatement>
<code>$_SESSION</code>
<code>$this</code>
Expand Down Expand Up @@ -859,6 +869,9 @@
</MoreSpecificReturnType>
</file>
<file src="src/Storage/SessionArrayStorage.php">
<MethodSignatureMustProvideReturnType>
<code>offsetGet</code>
</MethodSignatureMustProvideReturnType>
<MixedArrayOffset>
<code>$_SESSION[$key]</code>
<code>$_SESSION[$key]</code>
Expand Down Expand Up @@ -946,7 +959,15 @@
<code>new TestContainer('Default', $manager)</code>
</InvalidPropertyAssignmentValue>
</file>
<file src="test/ReflectionPropertyTrait.php">
<UnusedMethodCall>
<code>setAccessible</code>
</UnusedMethodCall>
</file>
<file src="test/Config/SessionConfigTest.php">
<UnusedMethodCall>
<code>setAccessible</code>
</UnusedMethodCall>
<ArgumentTypeCoercion>
<code>'InvalidArgumentException'</code>
</ArgumentTypeCoercion>
Expand Down Expand Up @@ -1456,6 +1477,10 @@
</PropertyNotSetInConstructor>
</file>
<file src="test/TestAsset/TestDbTableGatewaySaveHandler.php">
<MethodSignatureMustProvideReturnType>
<code>read</code>
<code>destroy</code>
</MethodSignatureMustProvideReturnType>
<PossiblyInvalidArgument>
<code>$id</code>
<code>$id</code>
Expand Down
7 changes: 7 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
</ignoreFiles>
</projectFiles>

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

/**
* DbTableGateway Save Handler Options
*
* @psalm-suppress MissingTemplateParam
*/
class DbTableGatewayOptions extends AbstractOptions
{
Expand Down
2 changes: 2 additions & 0 deletions src/SaveHandler/MongoDBOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* MongoDB session save handler Options
*
* @psalm-suppress MissingTemplateParam
*/
class MongoDBOptions extends AbstractOptions
{
Expand Down

0 comments on commit 2511842

Please sign in to comment.