Skip to content

Add DoWhile expression mutator#1411

Merged
sanmai merged 1 commit intomasterfrom
do-while-mutator
Nov 8, 2020
Merged

Add DoWhile expression mutator#1411
sanmai merged 1 commit intomasterfrom
do-while-mutator

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
@sidz sidz requested review from maks-rafalko and sanmai November 4, 2020 06:36
-
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.

3 participants

Comments