https://github.com/pbwebmedia/pbweb-coding-standard
https://github.com/pbwebmedia/pbweb-coding-standard
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/pbwebmedia/pbweb-coding-standard
- Owner: PBWebMedia
- License: mit
- Created: 2017-02-20T13:24:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-10-24T13:42:01.000Z (over 6 years ago)
- Last Synced: 2025-02-12T16:27:36.479Z (over 1 year ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PB Web Media PHPCS coding standard
This is the PHPCS ruleset we use. It is based on the Symfony2 coding standard provided by Escape Studios and features:
* Rule which requires spaces around string concat (`.`) operator
* Rule which requires spaces around unary not (`!`) operator
It also disables some rules which causes the following:
* Space after opening bracket are now allowed (conflicts with spaces around unary not rule, eg.: `some_func( ! $value)`)
* Function comments are no longer required (PHP7 type hinting fixes this)
* No need to order class methods by scope
* Multi line function declaration may be on the following line
## Install globally via composer:
Install using:
composer global require pbweb/pbweb-coding-standard
And configure phpcs to use the Pbweb standard
phpcs --config-set installed_paths ${HOME}/.composer/vendor/pbweb/pbweb-coding-standard/,${HOME}/.composer/vendor/escapestudios/symfony2-coding-standard/
phpcs --config-set default_standard Pbweb
## Install in your project only:
Install using:
composer require pbweb/pbweb-coding-standard
### Phing configuration
Example phing target: