Skip to content

Enable phpcs for Travis + more #51

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 4 commits into from
Aug 26, 2017
Merged

Conversation

kleisauke
Copy link
Member

  • Fix PSR-2 errors from phpcs.
  • Update phpunit.
  • Update sigmoidal contrast example.
  • Fix regression from Simple optimization of to array casting #49 (bandjoin/bandrank a Image class didn't work).
  • Rename the test files and apply the correct namespace.

- Update phpunit.
- Update sigmoidal contrast example.
- Fix regression from libvips#49.
- Rename the test files and apply the correct namespace.
}
$real = self::mapNumeric($this->pixel, function ($value) {
// FIXME: Left and right operands are identical
return $value > $value ? 255 : 0;
Copy link
Member Author

Choose a reason for hiding this comment

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

Should we just return 0 here?

Copy link
Member

Choose a reason for hiding this comment

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

I agree, perhaps with a comment saying something like "(x > x) is always false".

@jcupitt
Copy link
Member

jcupitt commented Aug 26, 2017

Lots of nice improvements Kleis!

@jcupitt
Copy link
Member

jcupitt commented Aug 26, 2017

I think we could enable phpcs warnings if we exclude src/ImageAutodoc.php (it has lots of lines over 120 chars). What do you think?

+ bump Travis libvips to 8.5.8
@jcupitt jcupitt merged commit ca49f5a into libvips:master Aug 26, 2017
@jcupitt
Copy link
Member

jcupitt commented Aug 26, 2017

Great work!

@kleisauke
Copy link
Member Author

FYI:
The phpcs specific configuration is now in our custom ruleset which inherits from PSR-2 (see phpcs-ruleset.xml). In this ruleset I've re-enabled warnings and disabled the line-length check for src/ImageAutodoc.php (+ a "side effect"-check for the code examples, it gave warnings on the sig.php example).

Also bumped the Travis libvips to 8.5.8.

@kleisauke kleisauke deleted the enable-phpcs branch August 26, 2017 11:15
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.

2 participants