Skip to content

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

Merged
jrfnl merged 1 commit into
developfrom
passedparameters/add-new-isshortarray-param
May 20, 2021
Merged

PassedParameters::[has|get]Parameters(): add new, optional $isShortArray parameter#269
jrfnl merged 1 commit into
developfrom
passedparameters/add-new-isshortarray-param

Conversation

@jrfnl

@jrfnl jrfnl commented May 20, 2021

Copy link
Copy Markdown
Member

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

Development

Successfully merging this pull request may close these issues.

1 participant