CARVIEW |
zendframework / zend-coding-standard
Zend Framework coding standard
Installs: 204 710
Dependents: 267
Suggesters: 0
Security: 0
Stars: 41
Watchers: 30
Forks: 10
Open Issues: 11
pkg:composer/zendframework/zend-coding-standard
Requires
- php: ^7.1
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0
- slevomat/coding-standard: ^5.0.4
- squizlabs/php_codesniffer: ^3.5.1
- webimpress/coding-standard: ^1.0.5
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
BSD-3-Clause cf5b336141d34e9c15c7aff7da429ce5be9905ff
- dev-master
- dev-develop / 2.0.x-dev
- 2.0.0alpha4
- 2.0.0-alpha.3
- 2.0.0-alpha.2
- 2.0.0-alpha.1
- 1.0.0
- dev-feature/license-headers
- dev-feature/sniffs
This package is auto-updated.
Last update: 2020-01-20 18:08:11 UTC
README
Repository abandoned 2019-12-31
This repository has moved to laminas/laminas-coding-standard.
Repository with all coding standard ruleset for Zend Framework repositories.
Installation
-
Install the module via composer by running:
$ composer require --dev zendframework/zend-coding-standard
-
Add composer scripts into your
composer.json
:"scripts": { "cs-check": "phpcs", "cs-fix": "phpcbf" }
-
Create file
phpcs.xml
on base path of your repository with content:<?xml version="1.0"?> <ruleset name="Zend Framework Coding Standard"> <rule ref="./vendor/zendframework/zend-coding-standard/ruleset.xml"/> <!-- Paths to check --> <file>config</file> <file>src</file> <file>test</file> </ruleset>
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
-
To run checks only:
$ composer cs-check
-
To automatically fix many CS issues:
$ composer cs-fix