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

New coding standard #208

Merged
merged 9 commits into from Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 0 additions & 45 deletions .php_cs

This file was deleted.

14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Expand Up @@ -77,24 +77,24 @@ To do so:

## Running Coding Standards Checks

This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
standards checks, and provides configuration for our selected checks.
`php-cs-fixer` is installed by default via Composer.
`phpcs` is installed by default via Composer.

To run checks only:

```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
$ composer cs-check
```

To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
flag:
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`:


```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
$ composer cs-fix
```

If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
they pass, and make sure you add and commit the changes after verification.

## Recommended Workflow for Contributions
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Expand Up @@ -26,8 +26,8 @@
"require-dev": {
"zendframework/zend-json": "^2.6.1 || ^3.0",
"zendframework/zend-psr7bridge": "^0.2",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "^4.5"
"phpunit/phpunit": "^4.6",
"zendframework/zend-coding-standard": "~1.0.0"
},
"suggest": {
"zendframework/zend-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable",
Expand Down Expand Up @@ -56,10 +56,10 @@
"@cs-check",
"@test"
],
"upload-coverage": "coveralls -v",
"cs-check": "php-cs-fixer --version && php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover clover.xml"
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
}
}