[CodingStyle] Skip concat on first arg on ConsistentImplodeRector#3702
Merged
samsonasik merged 3 commits intorectorphp:mainfrom May 2, 2023
Merged
[CodingStyle] Skip concat on first arg on ConsistentImplodeRector#3702samsonasik merged 3 commits intorectorphp:mainfrom
samsonasik merged 3 commits intorectorphp:mainfrom
Conversation
# Failing Test for ConsistentImplodeRector Based on https://getrector.com/demo/ec054f63-0f4e-489d-a3da-fa87581814f0 Reported in rectorphp/rector#7903
samsonasik
requested changes
Apr 29, 2023
Member
There was a problem hiding this comment.
Could you try provide a patch as well, the first arg value should check its type insted of value on this line:
rector-src/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php
Lines 98 to 100 in 31f64cc
should can be checked by something like this:
$type = $this->getType($firstArgumentValue);
if ($type->isString()->yes()) {
return null;
}
Contributor
Author
|
Thanks for making it so easy to contribute! |
Member
|
Please update PR title to something like: |
samsonasik
reviewed
May 1, 2023
|
|
||
| namespace Rector\Tests\CodingStyle\Rector\FuncCall\ConsistentImplodeRector\Fixture; | ||
|
|
||
| final class DemoFile |
Member
There was a problem hiding this comment.
Suggested change
| final class DemoFile | |
| final class SkipConcatOnFirstArg |
samsonasik
reviewed
May 1, 2023
| @@ -0,0 +1,13 @@ | |||
| <?php | |||
Member
There was a problem hiding this comment.
Please update fixture file to : skip_concat_on_first_arg.php.inc
samsonasik
approved these changes
May 2, 2023
samsonasik
pushed a commit
that referenced
this pull request
May 8, 2023
) * Add failing test fixture for ConsistentImplodeRector # Failing Test for ConsistentImplodeRector Based on https://getrector.com/demo/ec054f63-0f4e-489d-a3da-fa87581814f0 Reported in rectorphp/rector#7903 * Use the type to check for string in ConsistentImplodeRector * Change fixture name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failing Test for ConsistentImplodeRector
Based on https://getrector.com/demo/ec054f63-0f4e-489d-a3da-fa87581814f0
Reported in rectorphp/rector#7903
Closes rectorphp/rector#7903