-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
[CodingStyle] Skip concat on first arg on ConsistentImplodeRector #3702
Conversation
# Failing Test for ConsistentImplodeRector Based on https://getrector.com/demo/ec054f63-0f4e-489d-a3da-fa87581814f0 Reported in rectorphp/rector#7903
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.
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
if ($firstArgumentValue instanceof String_) { | |
return null; | |
} |
should can be checked by something like this:
$type = $this->getType($firstArgumentValue);
if ($type->isString()->yes()) {
return null;
}
Thanks for making it so easy to contribute! |
Please update PR title to something like:
|
|
||
namespace Rector\Tests\CodingStyle\Rector\FuncCall\ConsistentImplodeRector\Fixture; | ||
|
||
final class DemoFile |
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.
final class DemoFile | |
final class SkipConcatOnFirstArg |
@@ -0,0 +1,13 @@ | |||
<?php |
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.
Please update fixture file to : skip_concat_on_first_arg.php.inc
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.
Thank you @nerones
) * 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
Failing Test for ConsistentImplodeRector
Based on https://getrector.com/demo/ec054f63-0f4e-489d-a3da-fa87581814f0
Reported in rectorphp/rector#7903
Closes rectorphp/rector#7903