Skip to content

Support for Messenger HandleTrait return types #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 4, 2025
Prev Previous commit
Next Next commit
code review 2 removed mixed type which doesn't exist in <PHP8
  • Loading branch information
Bartłomiej Nowak authored and bnowak committed Nov 7, 2024
commit d62ec03344e9004f61a48d5b16109b4ed32141ac
4 changes: 3 additions & 1 deletion src/Symfony/MessageMapFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,14 @@ private function guessHandledMessages(ClassReflection $reflectionClass): iterabl
}

/**
* @param mixed $index
* @param mixed $value
* @phpstan-assert-if-true class-string $index
* @phpstan-assert-if-true array<string, mixed> $value
* @phpstan-assert-if-false int $index
* @phpstan-assert-if-false class-string $value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
private static function containOptions(mixed $index, mixed $value): bool
private static function containOptions($index, $value): bool
{
if (is_string($index) && class_exists($index) && is_array($value)) {
return true;
Expand Down