-
-
Notifications
You must be signed in to change notification settings - Fork 687
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 for Newline with EncapsedStringsToSprintfRector #5060
Conversation
# Failing Test for EncapsedStringsToSprintfRector Based on https://getrector.org/demo/1b647b4f-dde9-4f90-b05e-74744045a3d1
Add failing test fixture for EncapsedStringsToSprintfRector
count( | ||
array_filter( | ||
$argumentVariables, | ||
fn($argumentVar): bool => $argumentVar instanceof ConstFetch && $argumentVar->name.'' === 'PHP_EOL' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argument->name . '' should can be (string) argument->name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samsonasik thanks, guessing you're also building against >7.3 as it doesn't like the return type on the closure
@brucealdridge I cherry-picked your commit at #5072 |
@samsonasik thank you! Haven't yet had the time to rewrite! |
…rintfRector (#5072) * Add failing test fixture for EncapsedStringsToSprintfRector # Failing Test for EncapsedStringsToSprintfRector Based on https://getrector.org/demo/1b647b4f-dde9-4f90-b05e-74744045a3d1 * Fix for prefixed_eol.php.inc * Check against PHP_EOL * allowing newline to be prefixed as well * [CodingStyle] Closes #5060 Fixes #5032 Add %s for pass PHP_EOL constant * skip multiple eol * use PHP_EOL const * [ci-review] Rector Rectify Co-authored-by: bruce aldridge <bruce@incode.co.nz> Co-authored-by: rector-bot <tomas@getrector.org>
Fix for #5032