Skip to content

Commit

Permalink
Don't enforce the return type for the closure
Browse files Browse the repository at this point in the history
  • Loading branch information
merkushin committed Jul 31, 2024
1 parent 4738c7a commit 8eab758
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions config/psalm/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,9 @@
<InvalidScalarArgument occurrences="1">
<code>$course_name</code>
</InvalidScalarArgument>
<MissingClosureReturnType occurrences="1">
<code>function ( $item ) use ( &amp;$existing_module_names, &amp;$i ) {</code>
</MissingClosureReturnType>
<NullableReturnStatement occurrences="1">
<code>$term-&gt;term_id</code>
</NullableReturnStatement>
Expand Down Expand Up @@ -3558,6 +3561,9 @@
<code>null === $first</code>
<code>null === $second</code>
</DocblockTypeContradiction>
<InvalidAttribute occurrences="1">
<code>\ReturnTypeWillChange</code>
</InvalidAttribute>
<InvalidReturnStatement occurrences="1">
<code>wp_delete_attachment( $file_id, true )</code>
</InvalidReturnStatement>
Expand Down Expand Up @@ -3616,6 +3622,9 @@
<code>! self::$instance</code>
<code>self::$instance</code>
</DocblockTypeContradiction>
<InvalidAttribute occurrences="1">
<code>\ReturnTypeWillChange</code>
</InvalidAttribute>
<InvalidReturnStatement occurrences="2">
<code>$this-&gt;create_job( $user_id, Sensei_Export_Job::class )</code>
<code>$this-&gt;create_job( $user_id, Sensei_Import_Job::class )</code>
Expand Down Expand Up @@ -4286,6 +4295,9 @@
</RedundantPropertyInitializationCheck>
</file>
<file src="includes/enrolment/class-sensei-course-enrolment-provider-results.php">
<InvalidAttribute occurrences="1">
<code>\ReturnTypeWillChange</code>
</InvalidAttribute>
<InvalidScalarArgument occurrences="1">
<code>$version</code>
</InvalidScalarArgument>
Expand Down Expand Up @@ -4394,10 +4406,18 @@
<InvalidArgument occurrences="1">
<code>$provider_states</code>
</InvalidArgument>
<InvalidAttribute occurrences="1">
<code>\ReturnTypeWillChange</code>
</InvalidAttribute>
<InvalidPropertyAssignmentValue occurrences="1">
<code>$provider_states</code>
</InvalidPropertyAssignmentValue>
</file>
<file src="includes/enrolment/class-sensei-enrolment-provider-state.php">
<InvalidAttribute occurrences="1">
<code>\ReturnTypeWillChange</code>
</InvalidAttribute>
</file>
<file src="includes/hooks/template.php">
<ArgumentTypeCoercion occurrences="1">
<code>'Sensei_Main'</code>
Expand Down Expand Up @@ -5255,12 +5275,6 @@
</UndefinedPropertyFetch>
</file>
<file src="includes/rest-api/class-sensei-rest-api-question-helpers-trait.php">
<ArgumentTypeCoercion occurrences="1">
<code>$post_args</code>
</ArgumentTypeCoercion>
<InvalidArgument occurrences="1">
<code>$post_args</code>
</InvalidArgument>
<PossibleRawObjectIteration occurrences="1">
<code>$question_categories</code>
</PossibleRawObjectIteration>
Expand Down

0 comments on commit 8eab758

Please sign in to comment.