2017 © Pedro Peláez
 

library cakephp-codesniffer

CakePHP CodeSniffer Standards

image

cakephp/cakephp-codesniffer

CakePHP CodeSniffer Standards

  • Wednesday, July 4, 2018
  • by cakephp
  • Repository
  • 47 Watchers
  • 191 Stars
  • 1,370,670 Installations
  • PHP
  • 392 Dependents
  • 65 Suggesters
  • 75 Forks
  • 10 Open issues
  • 43 Versions
  • 11 % Grown

The README.md

CakePHP Code Sniffer

Build Status Total Downloads Latest Stable Version Software License, (*1)

This code works with squizlabs/php_codesniffer and checks code against the coding standards used in CakePHP., (*2)

This sniffer package follows PSR-12 completely and ships with a lot of additional fixers on top., (*3)

List of included sniffs, (*4)

Which version should I use?

See version map., (*5)

Installation

You should install this codesniffer with composer:, (*6)

composer require --dev cakephp/cakephp-codesniffer
vendor/bin/phpcs --config-set installed_paths /path/to/your/app/vendor/cakephp/cakephp-codesniffer

The second command lets phpcs know where to find your new sniffs. Ensure that you do not overwrite any existing installed_paths value. Alternatively, install the dealerdirect/phpcodesniffer-composer-installer composer package which will handle configuring the phpcs installed_paths for you., (*7)

Usage

:warning: Warning when these sniffs are installed with composer, ensure that you have configured the CodeSniffer installed_paths setting., (*8)

Depending on how you installed the code sniffer changes how you run it. If you have installed phpcs, and this package with PEAR, you can do the following:, (*9)

vendor/bin/phpcs --colors -p -s --standard=CakePHP /path/to/code/

You can also copy the phpcs.xml.dist file to your project's root folder as phpcs.xml. This file will import the CakePHP Coding Standard. From there you can edit it to include/exclude as needed. With this file in place, you can run:, (*10)

vendor/bin/phpcs --colors -p -s /path/to/code/

If you are using Composer to manage your CakePHP project, you can also add the below to your composer.json file:, (*11)

{
    "scripts": {
        "cs-check": "vendor/bin/phpcs --colors -p -s --extensions=php src/ tests/"
    }
}

Running Tests

You can run tests with composer. Because of how PHPCS test suites work, there is additional configuration state in phpcs that is required., (*12)

composer test

Once this has been done once, you can use phpunit --filter CakePHP to run the tests for the rules in this repository., (*13)

Contributing

If you'd like to contribute to the Code Sniffer, you can fork the project add features and send pull requests., (*14)

Releasing CakePHP Code Sniffer

  • Create a signed tag
  • Write the changelog in the tag commit

The Versions

04/07 2018

1.x-dev

1.9999999.9999999.9999999-dev http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

04/07 2018

1.0.4

1.0.4.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

09/06 2018

dev-master

9999999-dev http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

09/06 2018

3.0.5

3.0.5.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

08/06 2018

1.0.3

1.0.3.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

08/06 2018

3.0.4

3.0.4.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

20/05 2018

dev-next

dev-next http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

23/01 2018

dev-bump-year

dev-bump-year http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

21/12 2017

3.0.3

3.0.3.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

12/12 2017

3.0.2

3.0.2.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

28/07 2017

3.0.1

3.0.1.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

07/05 2017

3.0.0

3.0.0.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

01/03 2017

2.4.0

2.4.0.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

29/01 2017

3.0.x-dev

3.0.9999999.9999999-dev http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

22/12 2016

2.3.0

2.3.0.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

26/11 2016

2.2.0

2.2.0.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

05/11 2016

2.1.5

2.1.5.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

23/10 2016

1.0.2

1.0.2.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

02/09 2016

2.1.3

2.1.3.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

19/08 2016

2.1.2

2.1.2.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

19/07 2016

2.1.1

2.1.1.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

13/07 2016

2.1.0

2.1.0.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

01/04 2016

2.0.7

2.0.7.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

29/11 2015

2.0.6

2.0.6.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

27/09 2015

2.0.5

2.0.5.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

25/09 2015

1.0.1

1.0.1.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

10/07 2015

2.0.4

2.0.4.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

17/03 2015

2.0.3

2.0.3.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

10/02 2015

2.0.2

2.0.2.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

10/02 2015

2.0.1

2.0.1.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

05/02 2015

2.0.0

2.0.0.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

22/12 2014

1.0.0

1.0.0.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

11/12 2014

0.1.31

0.1.31.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

05/12 2014

0.1.30

0.1.30.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

27/11 2014

dev-update-fxer-2

dev-update-fxer-2 http://cakephp.org

CakePHP CodeSniffer Standards for phpcs-fixer auto-correct branch.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

04/10 2014

0.1.29

0.1.29.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

26/09 2014

dev-update-fixer

dev-update-fixer http://cakephp.org

CakePHP CodeSniffer Standards for phpcs-fixer auto-correct branch.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework codesniffer

18/09 2014

0.1.28

0.1.28.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

framework codesniffer

17/09 2014

dev-phpcs-fixer

dev-phpcs-fixer http://cakephp.org

CakePHP CodeSniffer Standards for phpcs-fixer auto-correct branch.

  Sources   Download

MIT

The Requires

 

framework codesniffer

30/06 2014

0.1.27

0.1.27.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

framework codesniffer

23/06 2014

0.1.26

0.1.26.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

framework codesniffer

22/05 2014

0.1.25

0.1.25.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

framework codesniffer

22/05 2014

0.1.24

0.1.24.0 http://cakephp.org

CakePHP CodeSniffer Standards

  Sources   Download

MIT

The Requires

 

framework codesniffer