Skip to content

Commit

Permalink
chore: fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed May 27, 2024
1 parent f6a78f1 commit 49c3f52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
20 changes: 0 additions & 20 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,6 @@
<InvalidDocblock>
<code><![CDATA[final class ActivityInstantiator extends Instantiator]]></code>
</InvalidDocblock>
<PossiblyNullArgument>
<code><![CDATA[$this->getInstance($prototype)]]></code>
</PossiblyNullArgument>
</file>
<file src="src/Internal/Declaration/Instantiator/Instantiator.php">
<MissingTemplateParam>
Expand All @@ -527,12 +524,6 @@
<InvalidDocblock>
<code><![CDATA[final class WorkflowInstantiator extends Instantiator]]></code>
</InvalidDocblock>
<PossiblyNullArgument>
<code><![CDATA[$this->getInstance($prototype)]]></code>
</PossiblyNullArgument>
<RedundantCondition>
<code><![CDATA[$class !== null]]></code>
</RedundantCondition>
</file>
<file src="src/Internal/Declaration/Prototype/Prototype.php">
<InvalidReturnStatement>
Expand Down Expand Up @@ -595,12 +586,10 @@
</InvalidPropertyAssignmentValue>
<MissingClosureReturnType>
<code><![CDATA[function (QueryInput $input) use ($fn) {]]></code>
<code><![CDATA[function (UpdateInput $input) use ($fn) {]]></code>
</MissingClosureReturnType>
<MoreSpecificImplementedParamType>
<code><![CDATA[$handler]]></code>
<code><![CDATA[$handler]]></code>
<code><![CDATA[$name]]></code>
</MoreSpecificImplementedParamType>
<PropertyNotSetInConstructor>
<code><![CDATA[$queryExecutor]]></code>
Expand All @@ -615,7 +604,6 @@
<file src="src/Internal/Declaration/WorkflowInstance/SignalQueue.php">
<ArgumentTypeCoercion>
<code><![CDATA[$signal]]></code>
<code><![CDATA[$signal]]></code>
</ArgumentTypeCoercion>
<MissingConstructor>
<code><![CDATA[$onSignal]]></code>
Expand Down Expand Up @@ -752,13 +740,9 @@
</PossiblyFalseArgument>
</file>
<file src="src/Internal/Marshaller/Type/ArrayType.php">
<DocblockTypeContradiction>
<code><![CDATA[\is_array($value)]]></code>
</DocblockTypeContradiction>
<MoreSpecificImplementedParamType>
<code><![CDATA[$current]]></code>
<code><![CDATA[$value]]></code>
<code><![CDATA[$value]]></code>
</MoreSpecificImplementedParamType>
</file>
<file src="src/Internal/Marshaller/Type/DateIntervalType.php">
Expand Down Expand Up @@ -1144,10 +1128,6 @@
<code><![CDATA[findValidateUpdateHandler]]></code>
<code><![CDATA[getUpdateHandlerNames]]></code>
</UndefinedInterfaceMethod>
<UnusedVariable>
<code><![CDATA[$resolver]]></code>
<code><![CDATA[$resolver]]></code>
</UnusedVariable>
</file>
<file src="src/Internal/Transport/Router/StartWorkflow.php">
<MissingClosureReturnType>
Expand Down
8 changes: 2 additions & 6 deletions src/Internal/Declaration/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,11 @@ private function createExecutorFromMethod(\ReflectionMethod $fun): \Closure
* @psalm-return FunctionExecutor
*
* @param \ReflectionFunction $fun
* @return \Closure
* @return \Closure(object, array): mixed
*/
private function createExecutorFromFunction(\ReflectionFunction $fun): \Closure
{
return static function (?object $ctx, array $arguments) use ($fun) {
if ($ctx === null) {
return $fun->invoke(...$arguments);
}

return static function (object $ctx, array $arguments) use ($fun) {
$closure = $fun->getClosure();

try {
Expand Down
1 change: 1 addition & 0 deletions src/Internal/Marshaller/Type/ArrayType.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public static function makeRule(\ReflectionProperty $property): ?MarshallingRule

/**
* @psalm-assert array $value
* @param mixed $value
* @param array $current
*/
public function parse($value, $current): array
Expand Down

0 comments on commit 49c3f52

Please sign in to comment.