Skip to content

PassedParameters::[has|get]Parameters(): add new, optional $isShortArray parameter #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2021

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 20, 2021

This adds a new, optional $isShortArray parameter to the PassedParameters::hasParameters() and the PassedParameters::getParameters() methods to allow for skipping the "is short array" check for passed square brackets when the value is set to true.

It is HIGHLY DISCOURAGED to ever use this parameter and this parameter should only ever be used with extreme care and forethought!

The reason to add this parameter is that it will allow for the "is short array or short list" check to use the PassedParameters functionality without throwing execution into an infinite loop.
Most likely, the use in that check will be the only legitimate use of the parameter.

Includes dedicated unit tests for documenting the behaviour of the class when the $isShortArray parameter is used.

…rray` parameter

This adds a new, optional `$isShortArray` parameter to the `PassedParameters::hasParameters()` and the `PassedParameters::getParameters()` methods to allow for skipping the "is short array" check for passed square brackets when the value is set to `true`.

It is HIGHLY DISCOURAGED to ever use to this parameter and this parameter should only ever be used with extreme care and forethought!

The reason to add this parameter is that it will allow for the "is short array or short list" check to use the `PassedParameters` functionality without throwing execution into an infinite loop.
Most likely, the use in that check will be the only legitimate use of the parameter.

Includes dedicated unit tests for documenting the behaviour of the class when the `$isShortArray` parameter is used.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone May 20, 2021
@jrfnl jrfnl merged commit 4968182 into develop May 20, 2021
@jrfnl jrfnl deleted the passedparameters/add-new-isshortarray-param branch May 20, 2021 08:01
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