-
Notifications
You must be signed in to change notification settings - Fork 8
/
.php_cs.dist
54 lines (50 loc) · 1.86 KB
/
.php_cs.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
$finder = PhpCsFixer\Finder::create()
//->exclude('somedir')
# exclude 3rd-party classes
->notPath('php-classes/BaseFacebook.class.php')
->notPath('php-classes/Facebook.class.php')
->notPath('php-classes/FacebookApiException.class.php')
->notPath('php-classes/Mailchimp.php')
->notPath('php-classes/OAuthConsumer.class.php')
->notPath('php-classes/OAuthException.class.php')
->notPath('php-classes/OAuthRequest.class.php')
->notPath('php-classes/OAuthSignatureMethod.class.php')
->notPath('php-classes/OAuthSignatureMethod_HMAC_SHA1.class.php')
->notPath('php-classes/OAuthSignatureMethod_PLAINTEXT.class.php')
->notPath('php-classes/OAuthSignatureMethod_RSA_SHA1.class.php')
->notPath('php-classes/OAuthToken.class.php')
->notPath('php-classes/OAuthUtil.class.php')
->notPath('php-classes/TwitterOAuth.class.php')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules([
/**
* Tap the most thoroughly-considered and
* widely-adopted presets for minimizing errors
*/
'@PSR1' => true,
'@PSR2' => true,
// '@PSR12' => true, // not supported yet
'@Symfony' => true,
/**
* Apply a consistent order to class members.
*
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.16|fixer:ordered_class_elements
*
* Compatible with @Symfony
*/
'ordered_class_elements' => true,
/**
* Symfony only cares about blank lines before returns,
* but phpcsfixer's default includes a few more cases.
*
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.16|fixer:blank_line_before_statement
*
* Compatible with @Symfony
*/
'blank_line_before_statement' => true,
])
->setFinder($finder)
;