File tree Expand file tree Collapse file tree 5 files changed +79
-2
lines changed
Expand file tree Collapse file tree 5 files changed +79
-2
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * This file is part of the broadway/broadway package.
3+ *
4+ * (c) Qandidate.com <opensource@qandidate.com>
5+ *
6+ * For the full copyright and license information, please view the LICENSE
7+ * file that was distributed with this source code.
8+ */
Original file line number Diff line number Diff line change 11/vendor /
2+ composer.lock
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ finder = PhpCsFixer \Finder::create ()
4+ ->in (__DIR__ );
5+
6+ return PhpCsFixer \Config::create ()
7+ ->setRules ([
8+ '@Symfony ' => true ,
9+ 'declare_strict_types ' => true ,
10+ ])
11+ ->setFinder ($ finder );
Original file line number Diff line number Diff line change 1+ broadway/coding-standard
2+ ========================
3+
4+ The coding standard of the Broadway project.
5+
6+ # Installation
7+
8+ ```
9+ $ composer require --dev broadway/coding-standard
10+ ```
11+
12+ # Configuration
13+
14+ ## PHP CS fixer
15+
16+ 1 . create a ` .php_cs ` file referencing the ` .php_cs.dist ` template:
17+
18+ ``` php
19+ # .php_cs
20+
21+ <?php
22+
23+ $config = require 'vendor/broadway/coding-standard/.php_cs.dist';
24+
25+ $config->setFinder(
26+ \PhpCsFixer\Finder::create()
27+ ->in([
28+ __DIR__ . '/src',
29+ __DIR__ . '/test',
30+ ])
31+ );
32+
33+ return $config;
34+
35+ ```
36+
37+ 2 . add ` .php_cs.cache ` to your ` .gitignore ` .
38+
39+ ## docheader
40+
41+ 1 . copy the ` .docheader.dist ` template:
42+
43+ ```
44+ cp vendor/broadway/coding-standard/.docheader.dist ./.docheader
45+ ```
46+
47+ 2 . modify the ` .docheader ` file is necessary.
48+
49+ # Usage
50+
51+ ```
52+ $ vendor/bin/php-cs-fixer fix --config=".php_cs" --allow-risky=yes --diff --verbose
53+ $ vendor/bin/docheader check {src,test}
54+ ```
Original file line number Diff line number Diff line change 11{
22 "name" : " broadway/coding-standard" ,
33 "description" : " The coding standard of the Broadway project." ,
4- "type" : " metapackage " ,
4+ "type" : " library " ,
55 "license" : " MIT" ,
66 "authors" : [
77 {
88 "name" : " othillo" ,
99 "email" : " othillo@othillo.nl"
1010 }
1111 ],
12- "require" : {}
12+ "require" : {
13+ "friendsofphp/php-cs-fixer" : " ^2.0" ,
14+ "malukenho/docheader" : " ^0.1.7"
15+ }
1316}
You can’t perform that action at this time.
0 commit comments