Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 27, 2023

In case of live coding/an unfinished array, the PassedParameters::getParameters() will return an empty array (no items), while in reality, it couldn't be determined.

To prevent incorrect sniff results, it is better for the sniff to bow out early in those situations.
This prevents a "Trying to access array offset on value of type bool" PHP notice.

Fixed now.

Includes additional test.

…/parse errors

In case of live coding/an unfinished array, the `PassedParameters::getParameters()` will return an empty array (no items), while in reality, it couldn't be determined.

To prevent incorrect sniff results, it is better for the sniff to bow out early in those situations.
This prevents a "Trying to access array offset on value of type bool" PHP notice.

Fixed now.

Includes additional test.
@jrfnl jrfnl added this to the 1.0.6 milestone May 27, 2023
@jrfnl jrfnl merged commit bb9d361 into develop May 27, 2023
@jrfnl jrfnl deleted the feature/abstractarraydeclaration-bugfix branch May 27, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant