Skip to content
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

PassedParameters::getParameters(): add new, optional $limit parameter #261

Merged
merged 1 commit into from
May 18, 2021

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 18, 2021

This adds a new, optional $limit parameter to the PassedParameters::getParameters() method to allow for limiting the number of parameters to be parsed.

This allows for higher efficiency when retrieving the parameters/array entries, especially for large arrays if only the first few entries need to be examined.

Includes implementing the use of this parameter in the PassedParameters::getParameter() method.

Includes dedicated unit tests for PassedParameters::getParameters() concerning the use of the $limit parameter.

The change in the PassedParameters::getParameter() method is already largely covered by the existing unit tests.
Only some extra tests for the use of $limit in combination with "named parameters" were needed. Those have been added to the GetParameterFromStackTest class.

Includes some minor documentation and test function naming improvements to the GetParameterFromStackTest class.

This adds a new, optional `$limit` parameter to the `PassedParameters::getParameters()` method to allow for limiting the number of parameters to be parsed.

This allows for higher efficiency when retrieving the parameters/array entries, especially for large arrays if only the first few entries need to be examined.

Includes implementing the use of this parameter in the `PassedParameters::getParameter()` method.

Includes dedicated unit tests for `PassedParameters::getParameters()` concerning the use of the `$limit` parameter.

The change in the `PassedParameters::getParameter()` method is already largely covered by the existing unit tests.
Only some extra tests for the use of `$limit` in combination with "named parameters" were needed. Those have been added to the `GetParameterFromStackTest` class.

Includes some minor documentation and test function naming improvements to the `GetParameterFromStackTest` class.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone May 18, 2021
@jrfnl jrfnl merged commit 000626c into develop May 18, 2021
@jrfnl jrfnl deleted the passedparameters/allow-setting-limit branch May 18, 2021 16:29
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.

None yet

1 participant