Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 13, 2025

Description

Reports/JUnit: improve condition

Generic/DisallowYodaConditions: remove redundant condition

The condition in the if already takes everything that's not an array, so if we reach the elseif we can be sure it's a T_ARRAY token.

PEAR/FunctionDeclaration: remove redundant conditions

The isset()'s in the same condition block already take care of this.

PSR12/ReturnTypeDeclaration: remove redundant conditions

The isset()'s in the same condition block already take care of this.

Squiz/VariableComment: remove redundant conditions

$commentEnd is retrieved by walking backwards (since the sniffs allows for attributes), so will never be false

Squiz/FunctionDeclarationArgumentSpacing: remove redundant conditions

The isset()'s in the same condition block already take care of this.

PEAR/MultiLineAssignment: fix incorrect parameter passed to findPrevious()

Suggested changelog entry

N/A These fixes should have no functional impact.

The condition in the `if` already takes everything that's not an array, so if we reach the `elseif` we can be sure it's a `T_ARRAY` token.
The `isset()`'s in the same condition block already take care of this.
The `isset()`'s in the same condition block already take care of this.
`$commentEnd` is retrieved by walking backwards (since the sniffs allows for attributes), so will never be `false`
The `isset()`'s in the same condition block already take care of this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant