Repository navigation
Report a dead || operand next to other values of the same variable - #14821
Conversation
`if ($o === 'a') return; if ($o === 'b' || $o === 'a')` no longer reported the dead `$o === 'a'`: the operand check skipped an || whose operands all test one variable. That pattern is written dead code; the in_array() of vimeo#5712 is not an ||, so it stays unreported. orOfAValueAnEarlierConditionExcludedAndAnotherIsNotParadoxical asserted the dead operand was fine and becomes the invalid case deadLeftOperandNextToAnotherValueOfTheSameVariableIsParadoxical. Fixes vimeo#14791 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbe4e63a03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
✅ Performance: unchanged · Types: increased
How to read this table
✅ wordpress: issues +1 −0Memory 2 029 → 2 029 MB (<0.1 %) · Wall 207.7 → 206.5 s (−0.6 %) Weighted 678 358 → 678 368 (+10, <0.01 %): always +1
Added (1)
head fbe4e63 · base 85636ae (merge-base) · workflow run |
|
Why the exemption goes:
That skipped case is written dead code (WordPress Unchanged:
|
Psalm misses
ParadoxicalConditionon a dead operand of an||when the other operands test the same variable.Before
After
Fixes #14791