@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | class ClassName extends ParentClass implements |
20 | - \ArrayAccess, |
|
20 | + \ArrayAccess, |
|
21 | 21 | \Foo\Bar\Countable, |
22 | 22 | \Serializable { |
23 | 23 | // constants, properties, methods |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | } |
114 | 114 | |
115 | 115 | interface MyInterface extends |
116 | - LongInterfaceName1, |
|
116 | + LongInterfaceName1, |
|
117 | 117 | LongInterfaceName2, |
118 | - LongInterfaceName3, |
|
118 | + LongInterfaceName3, |
|
119 | 119 | LongInterfaceName4 |
120 | 120 | { |
121 | 121 | } |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | -class ClassName extends ParentClass implements \ArrayAccess, \Countable |
|
2 | +class ClassName extends ParentClass implements \ArrayAccess, \Countable |
|
3 | 3 | { |
4 | 4 | // constants, properties, methods |
5 | 5 | } |
6 | 6 | |
7 | -class ClassName extends ParentClass,AnotherParentClass implements \ArrayAccess,\Countable { |
|
7 | +class ClassName extends ParentClass, AnotherParentClass implements \ArrayAccess, \Countable { |
|
8 | 8 | // constants, properties, methods |
9 | 9 | } |
10 | 10 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | class ClassName extends ParentClass implements |
63 | - \Foo\Bar\Countable , |
|
63 | + \Foo\Bar\Countable, |
|
64 | 64 | \Serializable |
65 | 65 | { |
66 | 66 | // constants, properties, methods |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | class ClassName implements |
129 | 129 | |
130 | - \ArrayAccess,\Countable, |
|
130 | + \ArrayAccess, \Countable, |
|
131 | 131 | \Serializable |
132 | 132 | { |
133 | 133 | // constants, properties, methods |
@@ -69,7 +69,9 @@ |
||
69 | 69 | class Test |
70 | 70 | { |
71 | 71 | public function test() { |
72 | - if (1) 1; |
|
72 | + if (1) { |
|
73 | + 1; |
|
74 | + } |
|
73 | 75 | 1 ? (1 ? 1 : 1) : 1; |
74 | 76 | } |
75 | 77 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | return array( |
46 | 46 | 73 => 1, |
47 | - ); |
|
47 | + ); |
|
48 | 48 | |
49 | 49 | }//end getErrorList() |
50 | 50 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | return array( |
63 | 63 | 27 => 1, |
64 | 64 | 46 => 1, |
65 | - ); |
|
65 | + ); |
|
66 | 66 | |
67 | 67 | }//end getWarningList() |
68 | 68 |
@@ -70,10 +70,10 @@ |
||
70 | 70 | // Find the first blank line before this opening brace, unless we get |
71 | 71 | // to another style definition, comment or the start of the file. |
72 | 72 | $endTokens = array( |
73 | - T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, |
|
74 | - T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, |
|
75 | - T_OPEN_TAG => T_OPEN_TAG, |
|
76 | - ); |
|
73 | + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, |
|
74 | + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, |
|
75 | + T_OPEN_TAG => T_OPEN_TAG, |
|
76 | + ); |
|
77 | 77 | $endTokens += PHP_CodeSniffer_Tokens::$commentTokens; |
78 | 78 | |
79 | 79 | $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | // Find the first blank line before this opening brace, unless we get |
71 | 71 | // to another style definition, comment or the start of the file. |
72 | - $endTokens = array( |
|
72 | + $endTokens = array( |
|
73 | 73 | T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, |
74 | 74 | T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, |
75 | 75 | T_OPEN_TAG => T_OPEN_TAG, |
@@ -132,9 +132,9 @@ |
||
132 | 132 | } else if ($foundIndent !== $expectedIndent) { |
133 | 133 | $error = 'Line indented incorrectly; expected %s spaces, found %s'; |
134 | 134 | $data = array( |
135 | - $expectedIndent, |
|
136 | - $foundIndent, |
|
137 | - ); |
|
135 | + $expectedIndent, |
|
136 | + $foundIndent, |
|
137 | + ); |
|
138 | 138 | |
139 | 139 | $fix = $phpcsFile->addFixableError($error, $i, 'Incorrect', $data); |
140 | 140 | if ($fix === true) { |
@@ -44,24 +44,24 @@ |
||
44 | 44 | * @var array |
45 | 45 | */ |
46 | 46 | public $colourNames = array( |
47 | - 'aqua' => 'aqua', |
|
48 | - 'black' => 'black', |
|
49 | - 'blue' => 'blue', |
|
50 | - 'fuchsia' => 'fuchsia', |
|
51 | - 'gray' => 'gray', |
|
52 | - 'green' => 'green', |
|
53 | - 'lime' => 'lime', |
|
54 | - 'maroon' => 'maroon', |
|
55 | - 'navy' => 'navy', |
|
56 | - 'olive' => 'olive', |
|
57 | - 'orange' => 'orange', |
|
58 | - 'purple' => 'purple', |
|
59 | - 'red' => 'red', |
|
60 | - 'silver' => 'silver', |
|
61 | - 'teal' => 'teal', |
|
62 | - 'white' => 'white', |
|
63 | - 'yellow' => 'yellow', |
|
64 | - ); |
|
47 | + 'aqua' => 'aqua', |
|
48 | + 'black' => 'black', |
|
49 | + 'blue' => 'blue', |
|
50 | + 'fuchsia' => 'fuchsia', |
|
51 | + 'gray' => 'gray', |
|
52 | + 'green' => 'green', |
|
53 | + 'lime' => 'lime', |
|
54 | + 'maroon' => 'maroon', |
|
55 | + 'navy' => 'navy', |
|
56 | + 'olive' => 'olive', |
|
57 | + 'orange' => 'orange', |
|
58 | + 'purple' => 'purple', |
|
59 | + 'red' => 'red', |
|
60 | + 'silver' => 'silver', |
|
61 | + 'teal' => 'teal', |
|
62 | + 'white' => 'white', |
|
63 | + 'yellow' => 'yellow', |
|
64 | + ); |
|
65 | 65 | |
66 | 66 | |
67 | 67 | /** |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | if ($colour !== $expected) { |
67 | 67 | $error = 'CSS colours must be defined in uppercase; expected %s but found %s'; |
68 | 68 | $data = array( |
69 | - $expected, |
|
70 | - $colour, |
|
71 | - ); |
|
69 | + $expected, |
|
70 | + $colour, |
|
71 | + ); |
|
72 | 72 | |
73 | 73 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUpper', $data); |
74 | 74 | if ($fix === true) { |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | $expected = '#'.$colour{1}.$colour{3}.$colour{5}; |
86 | 86 | $error = 'CSS colours must use shorthand if available; expected %s but found %s'; |
87 | 87 | $data = array( |
88 | - $expected, |
|
89 | - $colour, |
|
88 | + $expected, |
|
89 | + $colour, |
|
90 | 90 | ); |
91 | 91 | |
92 | 92 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Shorthand', $data); |
@@ -92,9 +92,9 @@ |
||
92 | 92 | if ($expected !== $tokens[$i]['content']) { |
93 | 93 | $error = 'Style definitions must be lowercase; expected %s but found %s'; |
94 | 94 | $data = array( |
95 | - $expected, |
|
96 | - $tokens[$i]['content'], |
|
97 | - ); |
|
95 | + $expected, |
|
96 | + $tokens[$i]['content'], |
|
97 | + ); |
|
98 | 98 | |
99 | 99 | $fix = $phpcsFile->addFixableError($error, $i, 'FoundUpper', $data); |
100 | 100 | if ($fix === true) { |
@@ -9,9 +9,9 @@ |
||
9 | 9 | |
10 | 10 | namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; |
11 | 11 | |
12 | - use PHP_CodeSniffer\Sniffs\Sniff; |
|
13 | - use PHP_CodeSniffer\Files\File; |
|
14 | - use PHP_CodeSniffer\Util\Tokens; |
|
12 | + use PHP_CodeSniffer\Sniffs\Sniff; |
|
13 | + use PHP_CodeSniffer\Files\File; |
|
14 | + use PHP_CodeSniffer\Util\Tokens; |
|
15 | 15 | |
16 | 16 | class ClassDefinitionClosingBraceSpaceSniff implements Sniff |
17 | 17 | { |