File tree Expand file tree Collapse file tree 2 files changed +12
-20
lines changed
Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Original file line number Diff line number Diff line change 22
33[ ![ CircleCI] ( https://circleci.com/gh/VincentLanglet/Symfony3-custom-coding-standard.svg?style=svg&circle-token=04bcfbcceb34f9644561c0a9ef27e935ff467705 )] ( https://circleci.com/gh/VincentLanglet/Symfony3-custom-coding-standard )
44
5+ Customized coding standards for Symfony3 projects.
6+
7+ Can be use for Symfony2 projects too.
8+
59Documentation
610-------------
711 * [ Coding Standard] ( docs/standards.md )
Original file line number Diff line number Diff line change 22
33This standard can be installed with the [ Composer] ( https://getcomposer.org/ ) dependency manager.
44
5- 1 . Add the repository to your composer.json:
5+ 1 . Add the coding standard as a dependency of your project
66
7- ``` json
8- "repositories" : [
9- {
10- "type" : " vcs" ,
11- "url" : " git@github.com:VincentLanglet/Symfony3-custom-coding-standard"
12- }
13- ]
147```
15-
16- 2 . Add the coding standard as a dependency of your project
17-
18- ``` json
19- "require-dev" : {
20- "vincentlanglet/symfony3-custom-coding-standard" : " ^2.18"
21- },
8+ composer require --dev vincentlanglet/symfony3-custom-coding-standard
229```
2310
24- 3 . Add the coding standard to the PHP_CodeSniffer install path
11+ 2 . Add the coding standard to the PHP_CodeSniffer install path
2512
26- The path is relative to the php_codesniffer install path. This is important to make it work both in your vagrant, local machine and PHPStorm
13+ The path is relative to the php_codesniffer install path.
14+ This is important to make it work both in your vagrant, local machine and PHPStorm
2715
2816```
2917bin/phpcs --config-set installed_paths ../../vincentlanglet/symfony3-custom-coding-standard
3018```
3119
32- 4 . Check the installed coding standards
20+ 3 . Check the installed coding standards
3321
3422```
3523bin/phpcs -i
3624```
3725
38- 5 . Done!
26+ 4 . Done!
3927
4028```
4129bin/phpcs --standard=Symfony3Custom /path/to/code
4230```
4331
44- 6 . (optional) Set up PHPStorm
32+ 5 . (optional) Set up PHPStorm
4533
4634- configure code sniffer under Languages & Frameworks -> PHP -> Code Sniffer
4735- Go to Editor -> Inspections -> PHP Code sniffer, refresh the standards and select Symfony3Custom
You can’t perform that action at this time.
0 commit comments