Skip to content

[code-quality] Add RepeatedAndNotEqualToNotInArrayRector#7517

Merged
TomasVotruba merged 2 commits intomainfrom
tv-not-identical-and
Oct 20, 2025
Merged

[code-quality] Add RepeatedAndNotEqualToNotInArrayRector#7517
TomasVotruba merged 2 commits intomainfrom
tv-not-identical-and

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba TomasVotruba commented Oct 20, 2025

 public function demo($someVariable): bool
    {
-        if ($someVariable !== 'a' && $someVariable !== 'b' && $someVariable !== 'c') {
+        if (! in_array($someVariable, ['a', 'b', 'c']), true) {
            return true;
        }

        return false;
    }

@samsonasik
Copy link
Copy Markdown
Member

rector-phpunit phpstan seems error, I will check.

@samsonasik
Copy link
Copy Markdown
Member

PHPStan for rector-phpunit fixed at PR:

@samsonasik
Copy link
Copy Markdown
Member

I will update e2e test in separate PR, the output diff seems now different:

[ERROR] The file
         "./invalid-paths/does-not-exi
         st/" does not exist.

@samsonasik
Copy link
Copy Markdown
Member

@TomasVotruba I created PR to fix e2e test for invalid paths on latest linux build

@samsonasik
Copy link
Copy Markdown
Member

@TomasVotruba please rebase 👍 e2e notice is fixed at PR:

due to new webmozart/assert 1.12 :)

@TomasVotruba TomasVotruba merged commit 7f05799 into main Oct 20, 2025
52 checks passed
@TomasVotruba TomasVotruba deleted the tv-not-identical-and branch October 20, 2025 14:51
@TomasVotruba
Copy link
Copy Markdown
Member Author

Let's ship 👍

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants