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

fix: no_useless_concat_operator - do not break variable (2) #7927

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tamiroh
Copy link
Contributor

@tamiroh tamiroh commented Apr 7, 2024

This pull request fixes a bug that was not considered in #7827.

Using Preg::match, \s also matches a full-width space. That is,

"abc $d" . " e" // contains full-width space before 'e'

is fixed to "abc $d e" as it corresponds to the "Allowd Pattern", but the variable $d would be broken because $d e is treated as a single variable.

To prevent the above, use instead of \s.

@tamiroh tamiroh changed the title fix: no_useless_concat_operator - do not break variable fix: no_useless_concat_operator - do not break variable (2) Apr 7, 2024
@coveralls
Copy link

Coverage Status

coverage: 96.013%. remained the same
when pulling 8aca6dc on tamiroh:fix-no-useless-concat-operator-fixer-2
into 87c75fa on PHP-CS-Fixer:master.

@tamiroh tamiroh marked this pull request as ready for review April 7, 2024 10:30
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.

None yet

2 participants