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
feat: Concat does not generate mutant when both operands are the same #1602
feat: Concat does not generate mutant when both operands are the same #1602
Conversation
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.
Looks good.
IMO psalm's issues can be manually ignored in this case.
Also, probably it will be safer to do
- if ($printer->prettyPrint([$node]) !== $printer->prettyPrint([$newNode])) {
+ if ($printer->prettyPrint([clone $node]) !== $printer->prettyPrint([$newNode])) {
since $node
potentially can be modified?
Head branch was pushed to by a user without write access
could you please ignore these Psalm errors? and we are good to merge |
@maks-rafalko done |
Not sure how it should be done then... with /** @psalm-suppress ImpureMethodCall */ issues were suppressed, but CS failed... with: /* @psalm-suppress ImpureMethodCall */ cs passes, but psalm issues are not suppressed.... |
then let's do it in <?xml version="1.0"?>
<psalm
errorLevel="8"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml">
<projectFiles>
<directory name="src/Mutator" />
<ignoreFiles>
<directory name="vendor" />
<directory name="src/PhpParser" />
</ignoreFiles>
</projectFiles>
+ <issueHandlers>
+ <ImpureMethodCall>
+ <errorLevel type="suppress">
+ <file name="src/Mutator/Operator/Concat.php"></file>
+ </errorLevel>
+ </ImpureMethodCall>
+ </issueHandlers>
</psalm> |
Thank you @michalbundyra cool first contribution |
Closes #1601
This PR: