Skip to content

Simplify PhpFileParser::getExtraTypes() logic #25

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 1 commit into from
Aug 20, 2025

Conversation

DanielEScherzer
Copy link
Contributor

The first time the method is called, a string is built up with |-separated extra types, then split based on |s, the resulting array is filtered to exclude non-empty strings, and that array is finally passed to PhpFileCleaner::setTypeConfig(). Given that the array only has at most a single entry, just set the array directly.

The first time the method is called, a string is built up with `|`-separated
extra types, then split based on `|`s, the resulting array is filtered to
exclude non-empty strings, and that array is finally passed to
`PhpFileCleaner::setTypeConfig()`. Given that the array only has at most a
single entry, just set the array directly.
@Seldaek Seldaek merged commit ba9f089 into composer:main Aug 20, 2025
@Seldaek
Copy link
Member

Seldaek commented Aug 20, 2025

Makes sense thanks

@DanielEScherzer DanielEScherzer deleted the patch-1 branch August 21, 2025 07:31
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