PHPCSStandards / composer-installer

Composer installer for PHP_CodeSniffer coding standards
https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
MIT License
559 stars 36 forks source link

CS: fix compliance with PSR12 #88

Closed jrfnl closed 4 years ago

jrfnl commented 4 years ago

Proposed Changes

PHPCS 3.5.0+ contains a far more complete PSR12 ruleset.

  1. The current code didn't fully comply with that ruleset. Some minor code tweaks fix that.
  2. PSR12 demands constant visibility to be declared, but as this project still supports PHP 5.3 and constant visibility wasn't introduced until PHP 7.1, this is not desirable. Excluding that particular rule from within the ruleset fixes that.

Related Issues

jrfnl commented 4 years ago

@mjrider Thanks. Now we have a passing build again, I'll be sending in some more PRs to further improve the testing of the plugin. I'm sending them in staged as otherwise we'd have to fix conflicts all the time.