zendframework / zend-coding-standard

Zend Framework Coding Standard
BSD 3-Clause "New" or "Revised" License
35 stars 8 forks source link

Zend Coding Standard 2 #5

Closed geerteltink closed 5 years ago

geerteltink commented 5 years ago

This PR adds a stricter ruleset. #1 is adding a lot of extra code and custom rules which are hard to maintain and it's so huge that it is hard to review. The huge amount of work done in #1 is not lost and is moved to webimpress/coding-standard.

The purpose of this PR is to start over and importing rules from other packages where possible.

Blocked by:

Testing

Make sure you remove the global installation after testing from your global composer.json file!!!

$ composer global config repositories.zend-coding-standard vcs git@github.com:xtreamwayz/zend-coding-standard.git
$ composer global require --dev zendframework/zend-coding-standard:dev-feature/new-rules

# For this to work, add this to your path: ~/.composer/vendor/bin
# Using `-s` prints the rules that triggered the errors so they can be reviewed easily
$ phpcs -sp --standard=ZendCodingStandard src

# Automatically fixing errors
$ phpcbf -sp --standard=ZendCodingStandard src
geerteltink commented 5 years ago

@mwop @froschdesign I've fixed the issues, added tests and I'm now working on the docs. 70 files is a lot, but it's still only 1 ruleset file and the rest is tests and documentation.

weierophinney commented 5 years ago

@xtreamwayz I'll try and review over the weekend; Monday at the latest.

geerteltink commented 5 years ago

All documentation is added. I've left plenty of typo's, inconsistencies and mistakes for others to discover 😁

Some rules in the ruleset.md file still need examples.

/cc @mwop, @froschdesign

geerteltink commented 5 years ago

Merged into develop