Skip to content

Conversation

@szepeviktor
Copy link
Contributor

Just 1 line.

Checklist

  • Project documentation has been updated to reflect the changes in this pull request, if applicable.
  • I have tested the changes in the local development environment (see contributing.md).
  • I have added phpunit tests.

@derekherman
Copy link

@szepeviktor Not sure I understand the intent of this PR. How is this change an improvement?

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Dec 29, 2020

It inspects the function's return value not its negated value: one less operation, more readability.

@szepeviktor
Copy link
Contributor Author

Same as pryley/site-reviews#23

*/

if ( ! version_compare( PHP_VERSION, '5.3', '>=' ) ) {
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally find the non-negative checks more readable so this looks like a useful change.

@kasparsd kasparsd merged commit cdd39a8 into xwp:develop Jan 4, 2021
@szepeviktor szepeviktor deleted the patch-1 branch January 4, 2021 11:05
@kidunot89 kidunot89 added this to the 3.6.1 milestone Jan 12, 2021
@kidunot89 kidunot89 mentioned this pull request Jan 12, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants