Zend Framework coding standard

Installs: 112 854

Dependents: 328

Suggesters: 0

Stars: 40

Watchers: 31

Forks: 11

Open Issues: 10


2.0.0-alpha.3 2019-01-01 19:08 UTC


Repository with all coding standard ruleset for Zend Framework repositories.


  1. Install the module via composer by running:

    $ composer require --dev zendframework/zend-coding-standard
  2. Add composer scripts into your composer.json:

    "scripts": {
      "cs-check": "phpcs",
      "cs-fix": "phpcbf"
  3. 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 -->

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


  • To run checks only:

    $ composer cs-check
  • To automatically fix many CS issues:

    $ composer cs-fix