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

BCFile::getCondition()/Conditions::getCondition(): sync with PHPCS 3.5.4 / new $first parameter #73

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Feb 3, 2020

PHPCS 3.5.4 introduces a new $first parameter to the File::getCondition() function.

The PHPCSUtils Conditions::getCondition() already had a parameter for the same - $reverse, though the boolean values used were also the reverse of how the new $first parameter is implemented.

As PHPCSUtils is still in alpha, I'm making the executive decision to rename the parameter for the Conditions::getCondition() function to $first, including reversing the meaning of the boolean values, to stay in line with PHPCS itself.

  • Includes adjusting any and all function calls in the existing codebase for the reversal of the meaning of the boolean.
  • Includes moving the unit tests covering this parameter, which were already in place in the test file for the Conditions::getCondition() function, to the test file for the BCFile::getCondition() function.
    The actual tests will be run for both functions now.

Refs:

…5.4 / new $first parameter

PHPCS 3.5.4 introduces a new `$first` parameter to the `File::getCondition()` function.

The PHPCSUtils `Conditions::getCondition()` already had a parameter for the same - `$reverse`, though the boolean values used were also the reverse of how the new `$first` parameter is implemented.

As PHPCSUtils is still in `alpha`, I'm making the executive decision to rename the parameter for the `Conditions::getCondition()`  function to `$first`, including reversing the meaning of the boolean values, to stay in line with PHPCS itself.

Includes adjusting any function calls in the existing codebase for the reversal of the meaning of the boolean.
Includes moving the unit tests covering this parameter, which were already in place in the test file for the `Conditions::getCondition()` function, to the test file for the `BCFile::getCondition()` function.
The actual tests will be run for both functions now.

Refs:
* squizlabs/PHP_CodeSniffer@77c5fa2.
@jrfnl jrfnl added this to the 1.0.0 milestone Feb 3, 2020
@jrfnl jrfnl merged commit c67b2fb into develop Feb 3, 2020
@jrfnl jrfnl deleted the feature/getconditions-sync-with-upstream branch February 3, 2020 02:11
@jrfnl jrfnl modified the milestones: 1.0.0, 1.0.0-alpha2 May 1, 2020
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