Skip to content

Previous statement rewrite#2207

Merged
TomasVotruba merged 10 commits intorectorphp:masterfrom
jeroensmit:previousStatementRewrite
Nov 1, 2019
Merged

Previous statement rewrite#2207
TomasVotruba merged 10 commits intorectorphp:masterfrom
jeroensmit:previousStatementRewrite

Conversation

@jeroensmit
Copy link
Copy Markdown
Contributor

Current/Previous expression did not work as expected.

It only took \PhpParser\Node\Stmt\Expression as boundary leading to issues when other instances of \PhpParser\Node\Stmt where previous.

It also turned out that the current implementation of correctPregMatchType was working by incident. But would break if any random statement was put on packages/Php71/tests/Rector/FuncCall/CountOnNullRector/Fixture/preg_match_array.php.inc:9

@TomasVotruba
Copy link
Copy Markdown
Member

I look forward to review this! Let me know when CI passes

@TomasVotruba TomasVotruba self-requested a review November 1, 2019 21:17
@TomasVotruba
Copy link
Copy Markdown
Member

Looks good, thank you 👍

@TomasVotruba TomasVotruba merged commit cd4f508 into rectorphp:master Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants