Skip to content
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

Updated the FlagBag templates. #237

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Updated the FlagBag templates. #237

merged 1 commit into from
Jan 20, 2025

Conversation

laurentmuller
Copy link
Contributor

This is the correction for issue #192.
It's seem that I never created a pull request for this.

src/FlagBag.php Outdated
Comment on lines 86 to 99
*
* @phpstan-return FlagBag<T>
*
* @psalm-template E of \BackedEnum
*
* @psalm-param E ...$flags
*
* @psalm-return FlagBag<E>
Copy link
Member

@ogizanagi ogizanagi Jan 20, 2025

Choose a reason for hiding this comment

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

Why does it need another template here? Can't it be:

Suggested change
*
* @phpstan-return FlagBag<T>
*
* @psalm-template E of \BackedEnum
*
* @psalm-param E ...$flags
*
* @psalm-return FlagBag<E>
*
* @template E of \BackedEnum
*
* @param class-string<E>|E $enumOrType
* @param E[] ...$flags
*
* @return FlagBag<E>

? The backed enum type is supposed to be the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see #192 (comment)

@ogizanagi
Copy link
Member

Thanks @laurentmuller.

@ogizanagi ogizanagi merged commit 0e67f9b into Elao:2.x Jan 20, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants