Skip to content

Commit

Permalink
Address Psalm issues after update
Browse files Browse the repository at this point in the history
- Address dataProvider return type
- Ignore NoConstructor warning for ResetAutoloadFunctionsTrait

Signed-off-by: Sebastiaan Knijnenburg <sebastiaan@castoredc.com>
  • Loading branch information
slknijnenburg committed Jun 14, 2024
1 parent fb17b47 commit 2b68754
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@
<code>$configs</code>
<code>$configs</code>
<code>$sm</code>
<code>is_object($serviceManager) ? $serviceManager::class : gettype($serviceManager)</code>
<code><![CDATA[$sm['module_class_method']]]></code>
<code><![CDATA[$sm['service_manager']]]></code>
<code><![CDATA[$sm['service_manager']]]></code>
Expand Down Expand Up @@ -351,6 +352,9 @@
<MixedOperand>
<code><![CDATA[$sm['module_class_method']]]></code>
</MixedOperand>
<NoValue>
<code>$serviceManager</code>
</NoValue>
<PossiblyNullArgument>
<code>$module</code>
</PossiblyNullArgument>
Expand All @@ -364,6 +368,8 @@
<RedundantCondition>
<code>gettype($config)</code>
<code>is_object($config)</code>
<code>$serviceManager instanceof ServiceManager</code>
<code>gettype($serviceManager)</code>
</RedundantCondition>
<RedundantConditionGivenDocblockType>
<code>is_scalar($config)</code>
Expand All @@ -372,6 +378,7 @@
<TypeDoesNotContainType>
<code>is_scalar($config)</code>
<code>is_scalar($config) ? $config : gettype($config)</code>
<code>is_object($serviceManager)</code>
</TypeDoesNotContainType>
<UndefinedMethod>
<code>getAbstractFactories</code>
Expand Down Expand Up @@ -638,9 +645,6 @@
<ArgumentTypeCoercion>
<code>$expectedInstanceOf</code>
</ArgumentTypeCoercion>
<MixedInferredReturnType>
<code>array</code>
</MixedInferredReturnType>
</file>
<file src="test/Listener/OnBootstrapListenerTest.php">
<InvalidPropertyAssignmentValue>
Expand Down Expand Up @@ -805,6 +809,10 @@
<TypeDoesNotContainType>
<code><![CDATA[is_array($this->loaders)]]></code>
</TypeDoesNotContainType>
<MissingConstructor>
<code>$loaders</code>
<code>$includePath</code>
</MissingConstructor>
</file>
<file src="test/TestAsset/MockApplication.php">
<MissingConstructor>
Expand Down
1 change: 1 addition & 0 deletions test/Listener/ModuleResolverListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function testModuleResolverListenerCanResolveModuleClasses(
self::assertInstanceOf($expectedInstanceOf, $moduleResolver($e));
}

/** @return array<string, array<int, string>> */
public static function validModuleNameProvider(): array
{
return [
Expand Down

0 comments on commit 2b68754

Please sign in to comment.