Repository navigation
Report only the ternary's own negated condition as redundant - #14417
Merged
Merged
Conversation
The negated types of a ternary include the clauses that held before it, which the context already applied: an elseif after count($a) > 2 reported $a[0] ?? null as never has-at-least-3.
Contributor
✅ Performance: unchanged · Types: decreased
How to read this table
✅ laravel: issues +0 −1Memory 1 768 → 1 768 MB (<0.1 %) · Wall 96.6 → 98.1 s (+1.5 %) Weighted 53 513 → 53 509 (−4, −0.01 %): L4 −1
Removed (1)
✅ symfony: issues +0 −1Memory 3 606 → 3 606 MB (<0.1 %) · Wall 166.2 → 163.8 s (−1.5 %) Weighted 98 402 → 98 398 (−4, <0.01 %): L4 −1
Removed (1)
✅ doctrine-orm: issues +0 −14Memory 393 → 393 MB (<0.1 %) · Wall 21.1 → 21.3 s (+0.6 %) Weighted 6 161 → 6 105 (−56, −0.91 %): L4 −14
Removed (14)
✅ drupal: issues +0 −1Memory 4 851 → 4 851 MB (<0.1 %) · Wall 183.1 → 182.1 s (−0.5 %) Weighted 169 112 → 169 110 (−2, <0.01 %): L2 −1
Removed (1)
head e299c77 · base 1552477 (merge-base) · workflow run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Psalm reports a false
RedundantConditionfor??in anelseifwhoseifcheckedcount().Before
After