marcin-orlowski / coding-standard
Marcin Orlowski's PHP Code Sniffer coding standard rules
Installs: 2 486
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.2 | ^8.0
- squizlabs/php_codesniffer: ^3.6
README
PHP Code Sniffer based coding standard checker I use in all my projects, so it may most likely not fit your own needs, yet feel free to fork and adjust
Installation
Use composer to install this package:
composer require --dev marcin-orlowski/coding-standard
Command line
Package installs check-coding-standard
wrapper script in vendor/bin
folder.
Use -h
to see all available options.
Alternatively, use standard directly:
$ vendor/bin/phpcs -s --standard=vendor/marcin-orlowski/coding-standard/coding-standard/MarcinOrlowski/ <PATH>
Using standard with PHP Storm / InteliJ
- Install
coding-standard
- Go to
Settings
/Editor
/Inspections
- In
PHP
inspection group selectPHP Code Sniffer validation
and enable it - Ensure you got
Code Sniffer
properly installed and setup (hitValidate
to ensure) - Set
Coding Standard
toCustom
- Click
...
next to it and select<YOUR-PROJECT-DIR>/vendor/marcin-orlowski/coding-standard
folder
License
- Written and copyrighted ©2016-2021 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
- Coding Standard package is open-sourced software licensed under the MIT license