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

Add DoWhile expression mutator #1411

Merged
merged 1 commit into from Nov 8, 2020
Merged

Add DoWhile expression mutator #1411

merged 1 commit into from Nov 8, 2020

Conversation

sidz
Copy link
Member

@sidz sidz commented Nov 3, 2020

This PR:

Mutates:

do {
    $condition = true;
- } while ($condition);
+ } while (false);

@sidz sidz added the Mutator label Nov 3, 2020
@sidz sidz self-assigned this Nov 3, 2020
sidz added a commit to infection/site that referenced this pull request Nov 3, 2020
-
message: "#^Parameter \\#1 \\$node \\(PhpParser\\\\Node\\\\Stmt\\\\Do_\\) of method Infection\\\\Mutator\\\\Loop\\\\DoWhile\\:\\:mutate\\(\\) should be contravariant with parameter \\$node \\(PhpParser\\\\Node\\) of method Infection\\\\Mutator\\\\Mutator\\:\\:mutate\\(\\)$#"
count: 1
path: ../src/Mutator/Loop/DoWhile.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't managed to get my head around this bit.

@maks-rafalko maks-rafalko added this to the 0.21.0 milestone Nov 8, 2020
@sanmai sanmai merged commit c2036e6 into master Nov 8, 2020
@sanmai sanmai deleted the do-while-mutator branch November 8, 2020 14:39
sidz added a commit to infection/site that referenced this pull request Nov 8, 2020
* Update mutators.md with DoWhile mutator

Ref: infection/infection#1411

* Fix typo

* Fix second typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants