This repository was archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Zend Coding Standard 2 #5
Closed
Closed
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
dbacd12
Import strict ruleset
geerteltink 5863c14
Allow functions inside functions
geerteltink 06a5606
Allow @var for constants
geerteltink d27454d
Allow @since for noting API additions
geerteltink 646eea1
Allow fancy yoda conditions as a defensive programming approach
geerteltink fa193f3
Forbid short open tag, but allow short echo tags for use in templates
geerteltink f1cef3f
Add documentation structure
geerteltink 911065a
Use xmllint to validate against schema
geerteltink 365acdf
Remove copyright in mkdocs config as it's not being used anymore
geerteltink b3146a6
Remove index.html because it's generated by the theme
geerteltink 5c86655
Disable phpunit tests until there is something to test
geerteltink ce7ae4a
Use PSR-12 compatible imports
geerteltink 3f602fa
Add rules to documentation
geerteltink 39ba67a
Add some test cases
geerteltink e9d9a2d
Update docs for alias functions
geerteltink 2d29543
Document the new way to ignore parts of a file phpcs:enable phpcs:dis…
geerteltink 2397775
Don't allow fully qualified classes from global space
geerteltink a063051
Add useful tests
geerteltink 29b05a0
Fix typo in ci script
geerteltink d35d34e
Don't remove xdebug as php nightly doesn't have it
geerteltink b4d915d
Test expected violations for fixable code
geerteltink 45d14bd
Require ? when default value is null
geerteltink 5b00974
Improve documentation formatting
geerteltink dc11e2e
Add PSR-12 test cases
geerteltink 6dc1801
Update concatenation spacing test
geerteltink c7718be
Update expected phpcs report
geerteltink 7367ecd
Improve concatenation tests
geerteltink a88527c
Add phpcs cache for speed improvement
geerteltink c15e28e
Document the coding standard and all rules
geerteltink d044763
First set of documentation improvements and fixes
geerteltink f722edd
More grammar fixes
geerteltink ba703a4
Reorder rules and disable double rules
geerteltink 2702288
Add missing rule: Class name resolution via ::class
geerteltink b9509c8
Add coding-style-guide to mkdocs config
geerteltink 4da5772
Add changelog for #5
geerteltink 9737c95
Improve wording and add example for Generic.Classes.DuplicateClassName
geerteltink 7ea79cc
It's raining outside, so more examples and improved formatting
geerteltink 70b63af
Update phpcs config in readme
geerteltink f93740b
Update array indentation test
geerteltink c531490
Don't align equal statements, double arrow arrays or phpdoc comment tags
geerteltink aba1c3a
Remove early exit rule as it is overly aggressive when "fixing" the code
geerteltink a276b18
Add references
geerteltink bf0d951
Update changelog with latest changes
geerteltink 3386b02
Update intro and readme
geerteltink 300e613
Fix creation of double trailing commas on specific arrays
geerteltink 61f3bc5
PSR-12: Force Unix LF (linefeed) line ending
geerteltink ea3de20
Allow global functions
geerteltink 53a7dcd
Align comments, statements and arrays
geerteltink 850f481
Align array double arrows
geerteltink 5eaa798
Validate fixes before running tests
geerteltink 41d35b9
Fix single arrow indention test
geerteltink 3974380
Reset array alignment and start from scratch
geerteltink 137dc8a
Update slevomat/coding-standard requirement and add regression test for
geerteltink 61f6b4b
Add test for constant aligning
geerteltink 5f2280d
Align double arrows in multiline arrays
geerteltink a3d45d7
Update expected errors report
geerteltink 27b735f
Require php_codesniffer 3.3.2
geerteltink 95213b5
Update array indentation tests
geerteltink 38a2dea
Use new format to declare array properties
geerteltink 7dc2f78
Update phpcs report
geerteltink File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,37 @@ | ||
dist: trusty | ||
sudo: false | ||
|
||
language: php | ||
|
||
php: | ||
- 7.1 | ||
- 7.2 | ||
- nightly | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
env: | ||
global: | ||
- COMPOSER_ARGS="--no-interaction" | ||
- COVERAGE_DEPS="php-coveralls/php-coveralls" | ||
|
||
matrix: | ||
include: | ||
- php: 7.1 | ||
env: | ||
- DEPS=lowest | ||
- php: 7.1 | ||
env: | ||
- DEPS=locked | ||
- CS_CHECK=true | ||
- TEST_COVERAGE=true | ||
- php: 7.1 | ||
env: | ||
- DEPS=latest | ||
- php: 7.2 | ||
env: | ||
- DEPS=lowest | ||
- php: 7.2 | ||
env: | ||
- DEPS=locked | ||
- php: 7.2 | ||
env: | ||
- DEPS=latest | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
- phpenv config-rm xdebug.ini | ||
- composer self-update | ||
|
||
install: travis_retry composer update --prefer-dist | ||
|
||
install: | ||
- travis_retry composer install $COMPOSER_ARGS | ||
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi | ||
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi | ||
- stty cols 120 && composer show | ||
stages: | ||
- Validate against schema | ||
- Test | ||
|
||
script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi | ||
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi | ||
jobs: | ||
allow_failures: | ||
- php: nightly | ||
|
||
after_script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi | ||
include: | ||
- stage: Validate against schema | ||
addons: | ||
apt: | ||
packages: | ||
- libxml2-utils | ||
script: xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd src/ZendCodingStandard/ruleset.xml | ||
|
||
notifications: | ||
email: false |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! 👍