Skip to content

Commit

Permalink
(phpstan) handle type checking requirement enforcing class of form to…
Browse files Browse the repository at this point in the history
… return
  • Loading branch information
JamesDPC committed Aug 8, 2024
1 parent e255ffb commit b3fd0bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controllers/ChimpleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public function XhrSubscribeForm() : ?XhrSubscribeForm
// this form doesn't need to retain state
$form->clearMessage();

return $form;
// phpstan return type checking requirement
return $form instanceof XhrSubscribeForm ? $form : null;
}

/**
Expand Down

0 comments on commit b3fd0bf

Please sign in to comment.