11# Flyeralarm Coding Guidelines
22
33
4- This repository contains the ruleset for the PHP code we develop at flyeralarm.
4+ This repository contains the ruleset for the PHP code we develop at [ FLYERALARM ] ( https:// flyeralarm.com ) .
55It mostly consists of PSR-2 with some custom additions. The rules are enforced with the help of squizlabs/PHP_CodeSniffer
66
77
8- How-To work within * this* project
9- ------
8+ ## How-To work within * this* project
109To prepare run command:
1110```
1211make
@@ -18,40 +17,38 @@ make test
1817```
1918
2019
21- Embed into * your* project
22- ------------------------
20+ ## Embed into * your* project
2321
2422Add as composer dev dependency:
2523```
26- composer config repositories.flyeralarm/coding-guidelines git ssh ://git@stash. flyeralarm:7999/cfa/coding-guidelines .git
27- composer require --dev flyeralarm/coding-guidelines
24+ composer config repositories.flyeralarm/php-code-validator git https ://github.com/ flyeralarm/php-code-validator .git
25+ composer require --dev flyeralarm/php-code-validator
2826```
2927
3028Embed code sniffer in your Makefile. To intend please use tabs instead of spaces. \
31- _ Usage:_ vendor/bin/fa-coding-guideline-validator <folder-to-test-one > <folder-to-test-two > <...>
29+ _ Usage:_ vendor/bin/php-code-validator <folder-to-test-one > <folder-to-test-two > <...>
30+
31+ Example Makefile:
3232```
3333test:
34- vendor/bin/fa-coding-guideline -validator src/ tests/
34+ vendor/bin/php-code -validator src/ tests/
3535```
3636
3737
38- Update to latest stable
39- -----------------------
38+ ### Update to latest stable
4039
4140```
42- composer update flyeralarm/coding-guidelines
41+ composer update flyeralarm/php-code-validator
4342```
4443
4544
46- Run sniffer within your project
47- -------------------------------
45+ ### Run sniffer
4846```
4947make test
5048```
5149
5250
53- Use within PHPStorm
54- -------------------
51+ ## Use within PHPStorm
55521 ) Ensure the path to PHP Code Sniffer is configured - [ open configuration manual] ( https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm#PHPCodeSnifferinPhpStorm-1.1.SpecifyingthepathtoPHPCodeSniffer )
56532 ) Open settings: \
5754 Mac: ` PhpStorm ` > ` Preferences ` > ` Editor ` > ` Inspections ` > ` PHP ` \
0 commit comments