Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

[WIP] Extended Zend Framework Coding Standard #1

Closed
wants to merge 225 commits into from
Closed
Show file tree
Hide file tree
Changes from 117 commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
ed2bd7d
Zend Framework Coding Standard - extended PSR-2. More Sniffs.
michalbundyra Nov 13, 2016
c55adc2
Removed redundant brackets
michalbundyra Nov 14, 2016
4528d1e
Fix suggested type for arrays
michalbundyra Nov 14, 2016
3ba6ca7
Package configuration
michalbundyra Nov 14, 2016
34841a6
Added tests for TrailingArrayComma sniff
michalbundyra Nov 14, 2016
e895cbb
Use eolChar instead of "\n"
michalbundyra Nov 15, 2016
1376b66
Comments fix
michalbundyra Nov 15, 2016
d60dba8
Added tests for UnusedUseStatement sniff
michalbundyra Nov 15, 2016
815858f
Removed redundant brackets
michalbundyra Nov 17, 2016
5bdde46
DocComment sniffs update + tests
michalbundyra Nov 27, 2016
35288e5
Unused use statement fix - Annotations checks
michalbundyra Nov 28, 2016
fc18e69
Methods\LineAfter sniff update + tests
michalbundyra Nov 30, 2016
12c0ebb
NamingConventions\ValidVariableName tests
michalbundyra Nov 30, 2016
0748eb6
PHP\TypeCasting tests
michalbundyra Nov 30, 2016
7bbd0a4
Added new rule: Squiz.WhiteSpace.CastSpacing.ContainsWhiteSpace
michalbundyra Nov 30, 2016
17ae5d4
New sniff: Strings\NoConcatenationAtTheEnd + tests
michalbundyra Nov 30, 2016
4a1b451
WhiteSpace\CommaSpacing sniff improvements + tests
michalbundyra Nov 30, 2016
baa1989
Updated rules:
michalbundyra Nov 30, 2016
6746649
Added rule: Generic.NamingConventions.ConstructorName
michalbundyra Nov 30, 2016
5314ee6
Added: PHP\LowerCaseKeyword Sniff + tests
michalbundyra Dec 2, 2016
c04a5fe
Tests fix - correct detecting testing files
michalbundyra Dec 2, 2016
8ab47c4
Commenting\DocComment sniff fixes, added PHPDocs, test fix
michalbundyra Dec 4, 2016
2da2480
Added PHP\CorrectClassNameCase sniff + tests
michalbundyra Dec 4, 2016
45776da
Fix PHP\CorrectClassNameCase - skip "use" inside closures.
michalbundyra Dec 4, 2016
dc2afe8
Fix for UnusedUseStatement sniff
michalbundyra Dec 5, 2016
0b14160
Added WhiteSpace\NoBlankLineAtStart sniff + tests
michalbundyra Dec 5, 2016
8bd9b9d
Added Array\Format sniff + tests
michalbundyra Dec 8, 2016
377f541
Added WhiteSpace\BlankLine sniff + tests and cs-fixes
michalbundyra Dec 9, 2016
aeb3011
Added new sniffs with tests
michalbundyra Dec 15, 2016
9019d1a
Added ZendCodingStandard.PHP.InstantiatingParenthesis sniff + tests
michalbundyra Dec 15, 2016
154bf21
PHP\InstantiatingParenthesis fix for anonymous classes and furureproo…
michalbundyra Dec 15, 2016
76d30f5
Added PHP\RedundantSemicolon sniff + tests
michalbundyra Dec 15, 2016
53797d3
Added new sniff `LogicalOperatorNotAtTheEndOfTheLine`
michalbundyra Feb 8, 2017
9549ba1
Rename .fixed file
michalbundyra Feb 9, 2017
b488b16
Added traits sniffs with tests
michalbundyra Feb 9, 2017
0eebc82
Added isGlobalUse method
michalbundyra Feb 9, 2017
572fadc
Updated comments and PHPDocs
michalbundyra Feb 9, 2017
c5b45ad
Updated conditions
michalbundyra Feb 9, 2017
e20d51d
Removed redundant statement
michalbundyra Feb 9, 2017
7aecb2b
Added more test cases for PHP\LowerCaseKeyword sniff
michalbundyra Feb 9, 2017
29c5ef6
Added namespaces sniffs + tests
michalbundyra Feb 9, 2017
ce81157
Added more cases for Classes\UnusedUseStatement sniff
michalbundyra Feb 9, 2017
c264e18
Updated dependencies
michalbundyra Feb 9, 2017
2f7334a
Enabled Squiz.WhiteSpace.LanguageConstructSpacing sniff
michalbundyra Feb 9, 2017
8380db1
Moved sniff "Classes\UnusedUseStatement" to "Namespaces" namespace
michalbundyra Feb 9, 2017
aeac0e4
Allow empty lines in arrays
michalbundyra Mar 15, 2017
7aa85c9
Updated to use PHP_CodeSniffer 3.0.0
michalbundyra May 30, 2017
7c4c616
Optimize conditions - changed `substr` to `strpos`
michalbundyra May 30, 2017
93994ea
Remove redundant brackets
michalbundyra May 30, 2017
30a9d7f
FunctionComment sniff checks `@inheritDoc` tags
michalbundyra May 31, 2017
93f27d4
Added ReturnValueWithoutBrackets sniff
michalbundyra May 31, 2017
cbab98d
Added default constant values in default phpunit configuration
michalbundyra May 31, 2017
23c52b6
Fix phpunit tests with PHP_CodeSniffer 3.0.0
michalbundyra May 31, 2017
402bd9d
Use property value instead of fixed string
michalbundyra May 31, 2017
71158ea
PHP 5.6 compatibility checks
michalbundyra Jun 2, 2017
6d26551
Default configuration in tests fix
michalbundyra Jun 2, 2017
1cd328d
Added `@dataProvider` tag checks
michalbundyra Jun 2, 2017
e3595e0
Fix order of statements inside trait's curly brackets
michalbundyra Jun 3, 2017
7c93e75
Updated to latest version of PHPUnit 6.2.1
michalbundyra Jun 3, 2017
804c3fc
Tag `@dataProvider` should be above `@param` tag(s), not necessarily …
michalbundyra Jun 4, 2017
ea77ed6
Array/FormatSniff fix
michalbundyra Jun 4, 2017
01388f5
Removed unnecessary parentheses
michalbundyra Jun 4, 2017
61ff8af
New sniff: UnnecessaryParentheses
michalbundyra Jun 4, 2017
4b34eb9
PHPDocs consistency - use `@inheritDoc` tag
michalbundyra Jun 4, 2017
efe3d0d
Strict comparisons
michalbundyra Jun 4, 2017
eabea35
Removed unused variable
michalbundyra Jun 4, 2017
dfb80c8
Improvements of FunctionComment sniff
michalbundyra Jun 4, 2017
f727152
Added missing token: `T_CLONE` which does not require parentheses
michalbundyra Jun 5, 2017
b799bcf
Allowed align values in multidimensional arrays with indexes
michalbundyra Jun 5, 2017
c85fb98
Added Formating Reference sniff
michalbundyra Jun 5, 2017
c82072a
Blank line in PHPDoc after description and before tags
michalbundyra Jun 5, 2017
59aaab6
VariableComment sniff skip normal comment when there is blank line after
michalbundyra Jun 5, 2017
8954525
CS fixes
michalbundyra Jun 5, 2017
525f61c
One blank line after file PHPDocs
michalbundyra Jun 5, 2017
66c607f
CS fixes
michalbundyra Jun 5, 2017
d02036d
Only one blank link allowed after file PHPDoc
michalbundyra Jun 5, 2017
dfbdfb9
Added sniff NoNullValues
michalbundyra Jun 8, 2017
1cd1dc6
Updated to PHP_CodeSniffer 3.0.1
michalbundyra Jun 21, 2017
0882b7b
Removed redundant comparision to `true`
michalbundyra Jun 21, 2017
bacdfda
Return type improvements + tests
michalbundyra Jun 21, 2017
11854ff
Removed unused variables
michalbundyra Jun 21, 2017
70b42fa
Methods\LineAfter sniff supports also anonymous classes
michalbundyra Jun 21, 2017
e79d16b
Added more test to increase sniffs coverage
michalbundyra Jun 21, 2017
ae163a6
Added missing error codes
michalbundyra Jun 21, 2017
364db0d
Unused use sniff checks return types (PHP 7)
michalbundyra Jun 22, 2017
19f5daf
Change to single token instead of arrays of token in "find" calls
michalbundyra Jun 22, 2017
1645193
Removed old "todo"
michalbundyra Jun 22, 2017
c99480e
Parentheses are allowed with "list" method
michalbundyra Jun 22, 2017
8366b44
CorrectClassNameCase sniff improvements
michalbundyra Jun 22, 2017
7651f64
ReturnType sniff - PHP 7 and 7.1 (nullable types)
michalbundyra Jun 22, 2017
1de64dd
ReturnType sniff moved from WhiteSpace to Formating
michalbundyra Jun 23, 2017
c9730a9
AlphabeticalSortedUses fix for single namespace in a file
michalbundyra Jun 23, 2017
31ff8dc
Fixed alphabetical sorting of global uses and traits
michalbundyra Jun 23, 2017
5127e4f
MultilineBrace sniff
michalbundyra Jun 23, 2017
5f4c799
Fixed sorting global uses, traits and traits statements
michalbundyra Jun 23, 2017
7c379bf
UnusedUseStatement sniff fix
michalbundyra Jun 23, 2017
c86c2a5
UnnecessaryParentheses sniff fix
michalbundyra Jun 26, 2017
ab76e6f
Added TernaryOperator sniff
michalbundyra Jun 28, 2017
79f934e
Fixes in MultilineBrace sniff
michalbundyra Jun 28, 2017
4aa2f2c
Renamed sniff LogicalOperatorNotAtTheEndOfTheLine -> BooleanOperator
michalbundyra Jun 28, 2017
47af616
TernaryOperator sniff - nested ternary operator tests
michalbundyra Jun 28, 2017
c7c6b6b
MultilineBrace sniff - added test to check variable method calls
michalbundyra Jun 29, 2017
cb74414
Improvements of MultilineBrace sniff
michalbundyra Jun 30, 2017
618ee11
Updated travis configuration
michalbundyra Jun 30, 2017
e4eebc4
Empty lines between use statements of different type (class, function…
michalbundyra Jul 9, 2017
19e353b
Added InternalFunction sniff
michalbundyra Jul 9, 2017
731bf85
Import PHP internal functions
michalbundyra Jul 9, 2017
6955d3b
Updated README.md and added badges (travis build and coverage)
michalbundyra Jul 9, 2017
47304d1
Renamed sniff InternalFunction to ImportInternalFunction and disabled…
michalbundyra Jul 12, 2017
bf10d1c
Removed redundant TODO comment
michalbundyra Jul 12, 2017
9373f0f
Removed slack integration in travis configuration
michalbundyra Jul 12, 2017
f3e63f1
Fixed indents in sniff
michalbundyra Jul 14, 2017
a1157c6
Added *experimental* sniff WhiteSpace.ScopeIndent sniff
michalbundyra Jul 14, 2017
8359875
ScopeIndent sniff checks also indents in arrays
michalbundyra Jul 15, 2017
d16680f
Updated to PHP_CodeSniffer 3.0.2
michalbundyra Jul 24, 2017
2c6cf8c
Fix wrong token name
michalbundyra Jul 29, 2017
52b435c
ScopeIndent sniff - fixed indent of closing bracket/parenthesis
michalbundyra Jul 29, 2017
2854410
Removed cases from Arrays/Format sniff covered by ScopeIndent sniff
michalbundyra Jul 29, 2017
f806a77
Removed sniff ControlStructures/MultilineBrace in favor of ScopeInden…
michalbundyra Aug 8, 2017
4af3053
CS fix - detected by ScopeIndent sniff
michalbundyra Aug 8, 2017
ec950b5
ReturnType sniff is now configurable
michalbundyra Aug 8, 2017
7ba3a9f
ReturnType sniff: removed "double" and added "object" from simple ret…
michalbundyra Aug 8, 2017
4666cd6
ReturnType sniff refactor and fix of removing non-whitespace tokens
michalbundyra Aug 8, 2017
5ea427b
ReturnType sniff refactor
michalbundyra Aug 8, 2017
730ba8b
Fixed .gitattributes - added missing 'export-ignore'
michalbundyra Aug 8, 2017
ffac5b6
Defined allowed simple type hints in sniff instead of using one from …
michalbundyra Aug 8, 2017
bfde1ad
Added comments in not implemented empty methods
michalbundyra Aug 8, 2017
c7cd4ac
Bumped PHPUnit to the latest version (^6.3)
michalbundyra Aug 8, 2017
84254fb
Added non-fixable cases for ReturnType sniff
michalbundyra Aug 23, 2017
a7eddd7
PHP\TypeCasting sniff improvements
michalbundyra Sep 6, 2017
0743bca
Added sniff to import internal PHP constants - disabled by default
michalbundyra Sep 6, 2017
ade1c6a
Import PHP internal constants
michalbundyra Sep 6, 2017
828ee22
Renamed property
michalbundyra Sep 6, 2017
d1584c7
Moved condition to check if function is defined to return earlier
michalbundyra Sep 6, 2017
7ae16bb
Single element array changed to one line
michalbundyra Sep 6, 2017
dd6c45c
Added bracket to clarify statement
michalbundyra Sep 6, 2017
8960350
Spacing in PHPDocs - around tags and types
michalbundyra Sep 6, 2017
fb65d2e
Updated FunctionCommentSniff with latests PHP_CodeSniffer changes
michalbundyra Sep 7, 2017
3327dbc
Added one more case to ScopeIndent sniff and simplified checks
michalbundyra Sep 11, 2017
24930ff
DocComment sniff - property tagWithType is public
michalbundyra Sep 19, 2017
601b54b
DocComment sniff - remove empty lines in doc comments
michalbundyra Sep 19, 2017
dfc1e08
Fixed typo in method name
michalbundyra Sep 19, 2017
1220a24
Extracted namespace helper methods to internal trait
michalbundyra Sep 19, 2017
92817e3
Added custom sniffs for function tags
michalbundyra Sep 19, 2017
3019fbd
Updated comments for methods to pass with new sniffs
michalbundyra Sep 19, 2017
27b724f
Added Commenting DataProviderTag sniff
michalbundyra Sep 19, 2017
4e9465c
Added new sniff - Commenting NoInlineCommentAfterCurlyClose
michalbundyra Sep 19, 2017
601ede7
Added new sniff - Commenting TagCase
michalbundyra Sep 19, 2017
d49fc71
Added new sniff - Commenting FunctionDisallowedTag
michalbundyra Sep 19, 2017
434c7d2
Changed default number of spaces before colon to 1 in return type dec…
michalbundyra Sep 19, 2017
fa4c90f
Allow parenthesis on nested coalesce operator in ternaty operator
michalbundyra Sep 19, 2017
ff5a7f4
Removed PHP 5.6 compatibility checks mode in ruleset
michalbundyra Sep 19, 2017
c805c0f
`@param` tag is redundant for params with type hint and default null …
michalbundyra Sep 19, 2017
be67318
Updated to PHP_CodeSniffer 3.1.0 and fixed failing sniff
michalbundyra Sep 20, 2017
b5bf038
Fixed detecting thrown exception in methods
michalbundyra Sep 20, 2017
0a4b63a
Updated Travis CI configuration
michalbundyra Oct 17, 2017
08249aa
Updated dependencies - PHP_CodeSniffer 3.1.1
michalbundyra Oct 17, 2017
b1df502
Updated dependencies: PHP_CodeSniffer 3.2.2
michalbundyra Dec 5, 2017
92c16b2
Member vars of nested class are now processed correctly
michalbundyra Jan 23, 2018
7200810
Updated Functions Param and ReturnType Sniffs
michalbundyra Jan 23, 2018
a2bb0f8
Fixed ScopeIndent sniff
michalbundyra Feb 13, 2018
212999a
Updated dependencies and Travis CI configuration
michalbundyra Feb 13, 2018
b877f17
Allow mixing array|iterable|\Generator|\Traversable with other types
michalbundyra Feb 13, 2018
2aa1d14
Added support for defining array values
michalbundyra Feb 14, 2018
8320881
Updated to PHP 7.1
michalbundyra Feb 14, 2018
42c183f
Removed extension of Generic.PHP.LowerCaseKeyword as all fixes are me…
michalbundyra Feb 14, 2018
c84b297
Fixed replacing 'non-string' type hints
michalbundyra Feb 14, 2018
4808418
PHP 7.1 features
michalbundyra Feb 14, 2018
5cac362
Fixed doc-comment indent fixer with nested tags
michalbundyra Feb 15, 2018
96fe4a6
Fixed calculating empty lines between tag with nested tags
michalbundyra Feb 15, 2018
50e2b19
Added restriction for nested tags - currently allowed only `@var`
michalbundyra Feb 15, 2018
5a87887
Enable ImportInternalConstant and ImportInternalFunction sniffs
michalbundyra Feb 15, 2018
404b6c5
Added new sniffs
michalbundyra Feb 15, 2018
79c3970
Arrays.FormatSniffs now extends AbstractArraySniff
michalbundyra Feb 15, 2018
8ca8974
Removed duplicated sniff - Generic.Files.OneTraitPerFile
michalbundyra Feb 15, 2018
31df9a2
Updated to PHP_CodeSniffer 3.2.3
michalbundyra Feb 21, 2018
a93f494
Removed unused while statement in UnusedUseStatementSniff
michalbundyra Feb 21, 2018
bb67bda
Disallow `@inheritDoc` and `{@inheritDoc}` tags
michalbundyra Feb 21, 2018
4d11dfe
InstantiatingParenthesis sniff fix on instantiating from array values
michalbundyra Feb 22, 2018
dcc3497
Allow parenthesis after close square bracket
michalbundyra Feb 22, 2018
bc891eb
CorrectClassNameCase sniff fix for array values
michalbundyra Feb 28, 2018
4bd1293
TagCase sniff is fixable
michalbundyra Feb 28, 2018
c534e79
New sniff - TagWithType - processing types with tags
michalbundyra Feb 28, 2018
9958a1f
Updated VariableComment sniff to check class properties comments
michalbundyra Feb 28, 2018
b452bfe
Tag with content check moved to DocComment sniff
michalbundyra Feb 28, 2018
2a2e49b
Multiline function comments
michalbundyra Feb 28, 2018
30fd9b4
Added ConstVisibility sniff
michalbundyra Feb 28, 2018
8dc0633
UnnecessaryParentheses sniff fix
michalbundyra Mar 5, 2018
c8d2093
UnnecessaryParentheses sniff fix
michalbundyra Mar 5, 2018
c8205ee
Require variable name with `@var` tag for non-class members
michalbundyra Mar 5, 2018
285f397
Improve error message for missing parameter name in PHPDocs
michalbundyra Mar 5, 2018
d43afdb
Fixed error message - data providers without Provider suffix
michalbundyra Mar 6, 2018
ad85588
Added new sniff SingleSemicolon
michalbundyra Mar 7, 2018
605a752
Better autofixing indents in doc comments tag descriptions
michalbundyra Mar 7, 2018
15b4fdb
Do not use "parent" as param type hint/return type in interfaces
michalbundyra Mar 8, 2018
176771d
Fixed loading imported classes/functions/constants
michalbundyra Mar 9, 2018
f8795bc
Better suggestion for class names (type hints, params, vars, throws, …
michalbundyra Mar 9, 2018
4c3f464
Fixed issue with removing tags with description
michalbundyra Mar 9, 2018
3ac062a
Added Throws sniff fixed file
michalbundyra Mar 9, 2018
fd40dd3
Import internal PHP constants and functions only in namespaced files
michalbundyra Mar 16, 2018
0fef36c
Fixed place where imported function and constant are placed
michalbundyra Mar 16, 2018
1e5fd8d
Fixed indents with "yield"
michalbundyra Mar 19, 2018
12a083a
Added DeclareStrictTypes sniff
michalbundyra Mar 27, 2018
70dfc76
Future-proof changes - tested with PHP_CodeSniffer dev-master
michalbundyra Mar 27, 2018
4d261c5
More PHP 7.1 improvements
michalbundyra Mar 27, 2018
e9b9b9e
Updated PHPUnit configuration to not report risky tests
michalbundyra Mar 27, 2018
4a137cf
Added new sniff Files.DeclareStrictTypes
michalbundyra Mar 28, 2018
09c34a1
TrailingArrayCommaSniff improvements
michalbundyra Mar 28, 2018
ed58b09
Do not include removed use statements when processing fixed file
michalbundyra Mar 28, 2018
55ed574
Updated doc comments
michalbundyra Mar 28, 2018
21dc5d7
Return numTags+1 to not run this sniff anymore in the file
michalbundyra Mar 28, 2018
d6f4292
Use phpcs: annotations instead of @codingStandards*
michalbundyra Mar 28, 2018
33addb1
Added phpcs.xsd schema in XML ruleset definitions
michalbundyra Mar 28, 2018
1db8b64
Added PEAR.Commenting.InlineComment to disallow hash (#) comments
michalbundyra Mar 28, 2018
bec92d7
Added phpcs and @codingStandards* sniffs
michalbundyra Mar 28, 2018
14a9253
Added Array.DoubleArrow sniff to check spacing around double arrow
michalbundyra Mar 28, 2018
1ab48b1
Typo fix
michalbundyra Mar 29, 2018
de8c234
Update LICENSE.md
michalbundyra Mar 29, 2018
4791944
Added support documents in docs/ directory
michalbundyra Mar 29, 2018
c6f36c0
Fixed spaces in README.md
michalbundyra Mar 29, 2018
6288f38
Removed redundant PHPUnit whitelist config attr
michalbundyra Mar 29, 2018
e9a19c6
DeclareStrictTypes fix - changed how autofixer works
michalbundyra Mar 29, 2018
5131a5a
Added Heredoc sniff - tag must be uppercase and cannot contain any sp…
michalbundyra Apr 2, 2018
2800f34
Added more cases for ScopeIndent sniff
michalbundyra Apr 4, 2018
4d14354
Improvements for Throw sniff
michalbundyra Apr 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.coveralls.yml
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this append export-ignore?

.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpcs.xml export-ignore
phpunit.xml.dist export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vendor/
phpunit.xml
clover.xml
coveralls-upload.json
80 changes: 80 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
sudo: false

language: php

cache:
directories:
- $HOME/.composer/cache
- vendor

env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="satooshi/php-coveralls"
- LEGACY_DEPS="phpunit/phpunit"

matrix:
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- TEST_COVERAGE=true
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- CS_CHECK=true
- php: 7
env:
- DEPS=latest
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- php: 7.1
env:
- DEPS=latest
- php: nightly
env:
- DEPS=lowest
- php: nightly
env:
- DEPS=locked
- php: nightly
env:
- DEPS=latest
allow_failures:
- php: nightly

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update

install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update $COMPOSER_ARGS --prefer-lowest --prefer-stable ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- stty cols 120
- COLUMNS=120 composer show

script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi

notifications:
email: false
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Zend Framework Coding Standard
==============================
# Zend Framework Coding Standard

[![Build Status](https://travis-ci.org/zendframework/zend-coding-standard.svg?branch=master)](https://travis-ci.org/zendframework/zend-coding-standard)
[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-coding-standard/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-coding-standard?branch=master)

Repository with all coding standard ruleset for Zend Framework repositories.


Installation
------------
## Installation

1. Install the module via composer by running:

Expand Down Expand Up @@ -40,8 +41,7 @@ You can add or exclude some locations in that file.
For a reference please see: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml


Usage
-----
## Usage

* To run checks only:

Expand Down
30 changes: 29 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,34 @@
"coding standard"
],
"require": {
"squizlabs/php_codesniffer": "^2.7"
"squizlabs/php_codesniffer": "3.0.2"
},
"require-dev": {
"phpunit/phpunit": "^5.7.21 || ^6.2.3"
},
"autoload": {
"psr-4": {
"ZendCodingStandard\\": "src/ZendCodingStandard/"
}
},
"autoload-dev": {
"files": [
"vendor/squizlabs/php_codesniffer/autoload.php"
],
"psr-4": {
"PHP_CodeSniffer\\": "vendor/squizlabs/php_codesniffer/src/",
"ZendCodingStandardTest\\": "test/"
}
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
}
}
Loading