-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs
73 lines (70 loc) · 2.52 KB
/
.php_cs
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.2.1|configurator
* you can change this configuration by importing this file.
*/
if (function_exists('xdebug_disable')) {
xdebug_disable();
}
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules(array(
'@PSR1' => true,
'@PSR2' => true,
//'@PHP54Migration' => true,
// Each line of multi-line DocComments must have an asterisk [PSR-5] and must be aligned with the first one.
//'align_multiline_comment' => true,
// Each element of an array must be indented exactly once.
//'array_indentation' => true,
// Converts simple usages of `array_push($x, $y);` to `$x[] = $y;`.
//'array_push' => true,
// PHP arrays should be declared using the configured syntax.
'array_syntax' => true,
// Order the flags in `fopen` calls, `b` and `t` must be last.
//'fopen_flag_order' => true,
// The flags in `fopen` calls must omit `t`, and `b` must be omitted or included consistently.
//'fopen_flags' => true,
// Convert PHP4-style constructors to `__construct`.
'no_php4_constructor' => true,
// There must be no `sprintf` calls with only the first argument.
//'no_useless_sprintf' => true,
// Logical NOT operators (`!`) should have one trailing whitespace.
'not_operator_with_successor_space' => true,
// PHPUnit assertion method calls like `->assertSame(true, $foo)` should be written with dedicated method like `->assertTrue($foo)`.
'php_unit_construct' => true,
// Usages of `->setExpectedException*` methods MUST be replaced by `->expectException*` methods.
//'php_unit_expectation' => true,
))
->setFinder(PhpCsFixer\Finder::create()
->exclude('adminer.php')
->exclude('application/logs')
->exclude('vendor')
->in(__DIR__)
)
;
/*
{
"version": "3.2.1",
"risky": true,
"fixerSets": [
"@PSR1",
"@PSR2",
"@PHP54Migration"
],
"fixers": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"array_push": true,
"fopen_flag_order": true,
"fopen_flags": true,
"no_php4_constructor": true,
"no_useless_sprintf": true,
"not_operator_with_successor_space": true,
"php_unit_construct": true,
"php_unit_expectation": true
}
}
*/