Completed
Pull Request — master (#1)
by Tomáš
06:48
created
CodeSniffer.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
      * @var array
182 182
      */
183 183
     public $defaultFileExtensions = array(
184
-                                     'php' => 'PHP',
185
-                                     'inc' => 'PHP',
186
-                                     'js'  => 'JS',
187
-                                     'css' => 'CSS',
184
+                                        'php' => 'PHP',
185
+                                        'inc' => 'PHP',
186
+                                        'js'  => 'JS',
187
+                                        'css' => 'CSS',
188 188
                                     );
189 189
 
190 190
     /**
@@ -193,16 +193,16 @@  discard block
 block discarded – undo
193 193
      * @var array(string)
194 194
      */
195 195
     public static $allowedTypes = array(
196
-                                   'array',
197
-                                   'boolean',
198
-                                   'float',
199
-                                   'integer',
200
-                                   'mixed',
201
-                                   'object',
202
-                                   'string',
203
-                                   'resource',
204
-                                   'callable',
205
-                                  );
196
+                                    'array',
197
+                                    'boolean',
198
+                                    'float',
199
+                                    'integer',
200
+                                    'mixed',
201
+                                    'object',
202
+                                    'string',
203
+                                    'resource',
204
+                                    'callable',
205
+                                    );
206 206
 
207 207
 
208 208
     /**
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
 
1230 1230
                 if (isset($this->ruleset[$code]) === false) {
1231 1231
                     $this->ruleset[$code] = array(
1232
-                                             'properties' => array(),
1232
+                                                'properties' => array(),
1233 1233
                                             );
1234 1234
                 } else if (isset($this->ruleset[$code]['properties']) === false) {
1235 1235
                     $this->ruleset[$code]['properties'] = array();
@@ -1457,8 +1457,8 @@  discard block
 block discarded – undo
1457 1457
                 // While there is support for a type of each pattern
1458 1458
                 // (absolute or relative) we don't actually support it here.
1459 1459
                 $replacements = array(
1460
-                                 '\\,' => ',',
1461
-                                 '*'   => '.*',
1460
+                                    '\\,' => ',',
1461
+                                    '*'   => '.*',
1462 1462
                                 );
1463 1463
 
1464 1464
                 $ignorePatterns[] = strtr($pattern, $replacements);
@@ -1471,11 +1471,11 @@  discard block
 block discarded – undo
1471 1471
 
1472 1472
                 if (isset($this->_tokenListeners[$token][$listenerClass]) === false) {
1473 1473
                     $this->_tokenListeners[$token][$listenerClass] = array(
1474
-                                                                      'class'      => $listenerClass,
1475
-                                                                      'source'     => $listenerSource,
1476
-                                                                      'tokenizers' => $tokenizers,
1477
-                                                                      'ignore'     => $ignorePatterns,
1478
-                                                                     );
1474
+                                                                        'class'      => $listenerClass,
1475
+                                                                        'source'     => $listenerSource,
1476
+                                                                        'tokenizers' => $tokenizers,
1477
+                                                                        'ignore'     => $ignorePatterns,
1478
+                                                                        );
1479 1479
                 }
1480 1480
             }
1481 1481
         }//end foreach
@@ -1655,8 +1655,8 @@  discard block
 block discarded – undo
1655 1655
             }
1656 1656
 
1657 1657
             $replacements = array(
1658
-                             '\\,' => ',',
1659
-                             '*'   => '.*',
1658
+                                '\\,' => ',',
1659
+                                '*'   => '.*',
1660 1660
                             );
1661 1661
 
1662 1662
             // We assume a / directory separator, as do the exclude rules
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/CSS.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 
69 69
         $finalTokens    = array();
70 70
         $finalTokens[0] = array(
71
-                           'code'    => T_OPEN_TAG,
72
-                           'type'    => 'T_OPEN_TAG',
73
-                           'content' => '',
74
-                          );
71
+                            'code'    => T_OPEN_TAG,
72
+                            'type'    => 'T_OPEN_TAG',
73
+                            'content' => '',
74
+                            );
75 75
 
76 76
         $newStackPtr      = 1;
77 77
         $numTokens        = count($tokens);
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
                 }
125 125
 
126 126
                 $finalTokens[$newStackPtr] = array(
127
-                                              'type'    => 'T_EMBEDDED_PHP',
128
-                                              'code'    => T_EMBEDDED_PHP,
129
-                                              'content' => $content,
130
-                                             );
127
+                                                'type'    => 'T_EMBEDDED_PHP',
128
+                                                'code'    => T_EMBEDDED_PHP,
129
+                                                'content' => $content,
130
+                                                );
131 131
 
132 132
                 $newStackPtr++;
133 133
                 continue;
@@ -137,16 +137,16 @@  discard block
 block discarded – undo
137 137
                 // Convert these back to T_STRING followed by T_COLON so we can
138 138
                 // more easily process style definitions.
139 139
                 $finalTokens[$newStackPtr] = array(
140
-                                              'type'    => 'T_STRING',
141
-                                              'code'    => T_STRING,
142
-                                              'content' => substr($token['content'], 0, -1),
143
-                                             );
140
+                                                'type'    => 'T_STRING',
141
+                                                'code'    => T_STRING,
142
+                                                'content' => substr($token['content'], 0, -1),
143
+                                                );
144 144
                 $newStackPtr++;
145 145
                 $finalTokens[$newStackPtr] = array(
146
-                                              'type'    => 'T_COLON',
147
-                                              'code'    => T_COLON,
148
-                                              'content' => ':',
149
-                                             );
146
+                                                'type'    => 'T_COLON',
147
+                                                'code'    => T_COLON,
148
+                                                'content' => ':',
149
+                                                );
150 150
                 $newStackPtr++;
151 151
                 continue;
152 152
             }
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
             if ($token['code'] === T_FUNCTION) {
155 155
                 // There are no functions in CSS, so convert this to a string.
156 156
                 $finalTokens[$newStackPtr] = array(
157
-                                              'type'    => 'T_STRING',
158
-                                              'code'    => T_STRING,
159
-                                              'content' => $token['content'],
160
-                                             );
157
+                                                'type'    => 'T_STRING',
158
+                                                'code'    => T_STRING,
159
+                                                'content' => $token['content'],
160
+                                                );
161 161
 
162 162
                 $newStackPtr++;
163 163
                 continue;
@@ -221,23 +221,23 @@  discard block
 block discarded – undo
221 221
                         // Work out what we trimmed off above and remember to re-add it.
222 222
                         $trimmed = substr($token['content'], 0, (strlen($token['content']) - strlen($content)));
223 223
                         $finalTokens[$newStackPtr] = array(
224
-                                                      'type'    => 'T_COLOUR',
225
-                                                      'code'    => T_COLOUR,
226
-                                                      'content' => $trimmed.$firstContent,
227
-                                                     );
224
+                                                        'type'    => 'T_COLOUR',
225
+                                                        'code'    => T_COLOUR,
226
+                                                        'content' => $trimmed.$firstContent,
227
+                                                        );
228 228
                     } else {
229 229
                         $finalTokens[$newStackPtr] = array(
230
-                                                      'type'    => 'T_HASH',
231
-                                                      'code'    => T_HASH,
232
-                                                      'content' => '#',
233
-                                                     );
230
+                                                        'type'    => 'T_HASH',
231
+                                                        'code'    => T_HASH,
232
+                                                        'content' => '#',
233
+                                                        );
234 234
                     }
235 235
                 } else {
236 236
                     $finalTokens[$newStackPtr] = array(
237
-                                                  'type'    => 'T_STRING',
238
-                                                  'code'    => T_STRING,
239
-                                                  'content' => '//',
240
-                                                 );
237
+                                                    'type'    => 'T_STRING',
238
+                                                    'code'    => T_STRING,
239
+                                                    'content' => '//',
240
+                                                    );
241 241
                 }//end if
242 242
 
243 243
                 $newStackPtr++;
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/PHP.php 1 patch
Indentation   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -46,232 +46,232 @@  discard block
 block discarded – undo
46 46
     public $scopeOpeners = array(
47 47
                             T_IF            => array(
48 48
                                                 'start'  => array(
49
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
50
-                                                             T_COLON              => T_COLON,
49
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
50
+                                                                T_COLON              => T_COLON,
51 51
                                                             ),
52 52
                                                 'end'    => array(
53
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
54
-                                                             T_ENDIF               => T_ENDIF,
55
-                                                             T_ELSE                => T_ELSE,
56
-                                                             T_ELSEIF              => T_ELSEIF,
53
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
54
+                                                                T_ENDIF               => T_ENDIF,
55
+                                                                T_ELSE                => T_ELSE,
56
+                                                                T_ELSEIF              => T_ELSEIF,
57 57
                                                             ),
58 58
                                                 'strict' => false,
59 59
                                                 'shared' => false,
60 60
                                                 'with'   => array(
61
-                                                             T_ELSE   => T_ELSE,
62
-                                                             T_ELSEIF => T_ELSEIF,
61
+                                                                T_ELSE   => T_ELSE,
62
+                                                                T_ELSEIF => T_ELSEIF,
63 63
                                                             ),
64
-                                               ),
64
+                                                ),
65 65
                             T_TRY           => array(
66 66
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
67 67
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
68 68
                                                 'strict' => true,
69 69
                                                 'shared' => false,
70 70
                                                 'with'   => array(),
71
-                                               ),
71
+                                                ),
72 72
                             T_CATCH         => array(
73 73
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
74 74
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
75 75
                                                 'strict' => true,
76 76
                                                 'shared' => false,
77 77
                                                 'with'   => array(),
78
-                                               ),
78
+                                                ),
79 79
                             T_FINALLY       => array(
80 80
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
81 81
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
82 82
                                                 'strict' => true,
83 83
                                                 'shared' => false,
84 84
                                                 'with'   => array(),
85
-                                               ),
85
+                                                ),
86 86
                             T_ELSE          => array(
87 87
                                                 'start'  => array(
88
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
89
-                                                             T_COLON              => T_COLON,
88
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
89
+                                                                T_COLON              => T_COLON,
90 90
                                                             ),
91 91
                                                 'end'    => array(
92
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
93
-                                                             T_ENDIF               => T_ENDIF,
92
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
93
+                                                                T_ENDIF               => T_ENDIF,
94 94
                                                             ),
95 95
                                                 'strict' => false,
96 96
                                                 'shared' => false,
97 97
                                                 'with'   => array(
98
-                                                             T_IF     => T_IF,
99
-                                                             T_ELSEIF => T_ELSEIF,
98
+                                                                T_IF     => T_IF,
99
+                                                                T_ELSEIF => T_ELSEIF,
100 100
                                                             ),
101
-                                               ),
101
+                                                ),
102 102
                             T_ELSEIF        => array(
103 103
                                                 'start'  => array(
104
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
105
-                                                             T_COLON              => T_COLON,
104
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
105
+                                                                T_COLON              => T_COLON,
106 106
                                                             ),
107 107
                                                 'end'    => array(
108
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
109
-                                                             T_ENDIF               => T_ENDIF,
110
-                                                             T_ELSE                => T_ELSE,
111
-                                                             T_ELSEIF              => T_ELSEIF,
108
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
109
+                                                                T_ENDIF               => T_ENDIF,
110
+                                                                T_ELSE                => T_ELSE,
111
+                                                                T_ELSEIF              => T_ELSEIF,
112 112
                                                             ),
113 113
                                                 'strict' => false,
114 114
                                                 'shared' => false,
115 115
                                                 'with'   => array(
116
-                                                             T_IF   => T_IF,
117
-                                                             T_ELSE => T_ELSE,
116
+                                                                T_IF   => T_IF,
117
+                                                                T_ELSE => T_ELSE,
118 118
                                                             ),
119
-                                               ),
119
+                                                ),
120 120
                             T_FOR           => array(
121 121
                                                 'start'  => array(
122
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
123
-                                                             T_COLON              => T_COLON,
122
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
123
+                                                                T_COLON              => T_COLON,
124 124
                                                             ),
125 125
                                                 'end'    => array(
126
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
127
-                                                             T_ENDFOR              => T_ENDFOR,
126
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
127
+                                                                T_ENDFOR              => T_ENDFOR,
128 128
                                                             ),
129 129
                                                 'strict' => false,
130 130
                                                 'shared' => false,
131 131
                                                 'with'   => array(),
132
-                                               ),
132
+                                                ),
133 133
                             T_FOREACH       => array(
134 134
                                                 'start'  => array(
135
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
136
-                                                             T_COLON              => T_COLON,
135
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
136
+                                                                T_COLON              => T_COLON,
137 137
                                                             ),
138 138
                                                 'end'    => array(
139
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
140
-                                                             T_ENDFOREACH          => T_ENDFOREACH,
139
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
140
+                                                                T_ENDFOREACH          => T_ENDFOREACH,
141 141
                                                             ),
142 142
                                                 'strict' => false,
143 143
                                                 'shared' => false,
144 144
                                                 'with'   => array(),
145
-                                               ),
145
+                                                ),
146 146
                             T_INTERFACE     => array(
147 147
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
148 148
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
149 149
                                                 'strict' => true,
150 150
                                                 'shared' => false,
151 151
                                                 'with'   => array(),
152
-                                               ),
152
+                                                ),
153 153
                             T_FUNCTION      => array(
154 154
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
155 155
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
156 156
                                                 'strict' => true,
157 157
                                                 'shared' => false,
158 158
                                                 'with'   => array(),
159
-                                               ),
159
+                                                ),
160 160
                             T_CLASS         => array(
161 161
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
162 162
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
163 163
                                                 'strict' => true,
164 164
                                                 'shared' => false,
165 165
                                                 'with'   => array(),
166
-                                               ),
166
+                                                ),
167 167
                             T_TRAIT         => array(
168 168
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
169 169
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
170 170
                                                 'strict' => true,
171 171
                                                 'shared' => false,
172 172
                                                 'with'   => array(),
173
-                                               ),
173
+                                                ),
174 174
                             T_USE           => array(
175 175
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
176 176
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
177 177
                                                 'strict' => false,
178 178
                                                 'shared' => false,
179 179
                                                 'with'   => array(),
180
-                                               ),
180
+                                                ),
181 181
                             T_DECLARE       => array(
182 182
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
183 183
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
184 184
                                                 'strict' => false,
185 185
                                                 'shared' => false,
186 186
                                                 'with'   => array(),
187
-                                               ),
187
+                                                ),
188 188
                             T_NAMESPACE     => array(
189 189
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
190 190
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
191 191
                                                 'strict' => false,
192 192
                                                 'shared' => false,
193 193
                                                 'with'   => array(),
194
-                                               ),
194
+                                                ),
195 195
                             T_WHILE         => array(
196 196
                                                 'start'  => array(
197
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
198
-                                                             T_COLON              => T_COLON,
197
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
198
+                                                                T_COLON              => T_COLON,
199 199
                                                             ),
200 200
                                                 'end'    => array(
201
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
202
-                                                             T_ENDWHILE            => T_ENDWHILE,
201
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
202
+                                                                T_ENDWHILE            => T_ENDWHILE,
203 203
                                                             ),
204 204
                                                 'strict' => false,
205 205
                                                 'shared' => false,
206 206
                                                 'with'   => array(),
207
-                                               ),
207
+                                                ),
208 208
                             T_DO            => array(
209 209
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
210 210
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
211 211
                                                 'strict' => true,
212 212
                                                 'shared' => false,
213 213
                                                 'with'   => array(),
214
-                                               ),
214
+                                                ),
215 215
                             T_SWITCH        => array(
216 216
                                                 'start'  => array(
217
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
218
-                                                             T_COLON              => T_COLON,
217
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
218
+                                                                T_COLON              => T_COLON,
219 219
                                                             ),
220 220
                                                 'end'    => array(
221
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
222
-                                                             T_ENDSWITCH           => T_ENDSWITCH,
221
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
222
+                                                                T_ENDSWITCH           => T_ENDSWITCH,
223 223
                                                             ),
224 224
                                                 'strict' => true,
225 225
                                                 'shared' => false,
226 226
                                                 'with'   => array(),
227
-                                               ),
227
+                                                ),
228 228
                             T_CASE          => array(
229 229
                                                 'start'  => array(
230
-                                                             T_COLON     => T_COLON,
231
-                                                             T_SEMICOLON => T_SEMICOLON,
230
+                                                                T_COLON     => T_COLON,
231
+                                                                T_SEMICOLON => T_SEMICOLON,
232 232
                                                             ),
233 233
                                                 'end'    => array(
234
-                                                             T_BREAK    => T_BREAK,
235
-                                                             T_RETURN   => T_RETURN,
236
-                                                             T_CONTINUE => T_CONTINUE,
237
-                                                             T_THROW    => T_THROW,
238
-                                                             T_EXIT     => T_EXIT,
234
+                                                                T_BREAK    => T_BREAK,
235
+                                                                T_RETURN   => T_RETURN,
236
+                                                                T_CONTINUE => T_CONTINUE,
237
+                                                                T_THROW    => T_THROW,
238
+                                                                T_EXIT     => T_EXIT,
239 239
                                                             ),
240 240
                                                 'strict' => true,
241 241
                                                 'shared' => true,
242 242
                                                 'with'   => array(
243
-                                                             T_DEFAULT => T_DEFAULT,
244
-                                                             T_CASE    => T_CASE,
245
-                                                             T_SWITCH  => T_SWITCH,
243
+                                                                T_DEFAULT => T_DEFAULT,
244
+                                                                T_CASE    => T_CASE,
245
+                                                                T_SWITCH  => T_SWITCH,
246 246
                                                             ),
247
-                                               ),
247
+                                                ),
248 248
                             T_DEFAULT       => array(
249 249
                                                 'start'  => array(
250
-                                                             T_COLON     => T_COLON,
251
-                                                             T_SEMICOLON => T_SEMICOLON,
250
+                                                                T_COLON     => T_COLON,
251
+                                                                T_SEMICOLON => T_SEMICOLON,
252 252
                                                             ),
253 253
                                                 'end'    => array(
254
-                                                             T_BREAK    => T_BREAK,
255
-                                                             T_RETURN   => T_RETURN,
256
-                                                             T_CONTINUE => T_CONTINUE,
257
-                                                             T_THROW    => T_THROW,
258
-                                                             T_EXIT     => T_EXIT,
254
+                                                                T_BREAK    => T_BREAK,
255
+                                                                T_RETURN   => T_RETURN,
256
+                                                                T_CONTINUE => T_CONTINUE,
257
+                                                                T_THROW    => T_THROW,
258
+                                                                T_EXIT     => T_EXIT,
259 259
                                                             ),
260 260
                                                 'strict' => true,
261 261
                                                 'shared' => true,
262 262
                                                 'with'   => array(
263
-                                                             T_CASE   => T_CASE,
264
-                                                             T_SWITCH => T_SWITCH,
263
+                                                                T_CASE   => T_CASE,
264
+                                                                T_SWITCH => T_SWITCH,
265 265
                                                             ),
266
-                                               ),
266
+                                                ),
267 267
                             T_START_HEREDOC => array(
268 268
                                                 'start'  => array(T_START_HEREDOC => T_START_HEREDOC),
269 269
                                                 'end'    => array(T_END_HEREDOC => T_END_HEREDOC),
270 270
                                                 'strict' => true,
271 271
                                                 'shared' => false,
272 272
                                                 'with'   => array(),
273
-                                               ),
274
-                           );
273
+                                                ),
274
+                            );
275 275
 
276 276
     /**
277 277
      * A list of tokens that end the scope.
@@ -283,15 +283,15 @@  discard block
 block discarded – undo
283 283
      * @var array
284 284
      */
285 285
     public $endScopeTokens = array(
286
-                              T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
287
-                              T_ENDIF               => T_ENDIF,
288
-                              T_ENDFOR              => T_ENDFOR,
289
-                              T_ENDFOREACH          => T_ENDFOREACH,
290
-                              T_ENDWHILE            => T_ENDWHILE,
291
-                              T_ENDSWITCH           => T_ENDSWITCH,
292
-                              T_BREAK               => T_BREAK,
293
-                              T_END_HEREDOC         => T_END_HEREDOC,
294
-                             );
286
+                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
287
+                                T_ENDIF               => T_ENDIF,
288
+                                T_ENDFOR              => T_ENDFOR,
289
+                                T_ENDFOREACH          => T_ENDFOREACH,
290
+                                T_ENDWHILE            => T_ENDWHILE,
291
+                                T_ENDSWITCH           => T_ENDSWITCH,
292
+                                T_BREAK               => T_BREAK,
293
+                                T_END_HEREDOC         => T_END_HEREDOC,
294
+                                );
295 295
 
296 296
     /**
297 297
      * A cache of different token types, resolved into arrays.
@@ -423,10 +423,10 @@  discard block
 block discarded – undo
423 423
                 // Binary casts need a special token.
424 424
                 if ($token[0] === 'b"') {
425 425
                     $finalTokens[$newStackPtr] = array(
426
-                                                  'code'    => T_BINARY_CAST,
427
-                                                  'type'    => 'T_BINARY_CAST',
428
-                                                  'content' => 'b',
429
-                                                 );
426
+                                                    'code'    => T_BINARY_CAST,
427
+                                                    'type'    => 'T_BINARY_CAST',
428
+                                                    'content' => 'b',
429
+                                                    );
430 430
                     $newStackPtr++;
431 431
                 }
432 432
 
@@ -710,10 +710,10 @@  discard block
 block discarded – undo
710 710
                 && $tokens[($stackPtr - 1)][0] !== T_OBJECT_OPERATOR
711 711
             ) {
712 712
                 $finalTokens[$newStackPtr] = array(
713
-                                              'content' => $token[1],
714
-                                              'code'    => T_TRAIT,
715
-                                              'type'    => 'T_TRAIT',
716
-                                             );
713
+                                                'content' => $token[1],
714
+                                                'code'    => T_TRAIT,
715
+                                                'type'    => 'T_TRAIT',
716
+                                                );
717 717
 
718 718
                 if (PHP_CODESNIFFER_VERBOSITY > 1) {
719 719
                     echo "\t\t* token $stackPtr changed from T_STRING to T_TRAIT".PHP_EOL;
@@ -738,11 +738,11 @@  discard block
 block discarded – undo
738 738
                 && $tokens[($stackPtr - 1)][0] !== T_PAAMAYIM_NEKUDOTAYIM
739 739
             ) {
740 740
                 $stopTokens = array(
741
-                               T_CASE               => true,
742
-                               T_SEMICOLON          => true,
743
-                               T_OPEN_CURLY_BRACKET => true,
744
-                               T_INLINE_THEN        => true,
745
-                              );
741
+                                T_CASE               => true,
742
+                                T_SEMICOLON          => true,
743
+                                T_OPEN_CURLY_BRACKET => true,
744
+                                T_INLINE_THEN        => true,
745
+                                );
746 746
 
747 747
                 for ($x = ($newStackPtr - 1); $x > 0; $x--) {
748 748
                     if (isset($stopTokens[$finalTokens[$x]['code']]) === true) {
@@ -754,10 +754,10 @@  discard block
 block discarded – undo
754 754
                     && $finalTokens[$x]['code'] !== T_INLINE_THEN
755 755
                 ) {
756 756
                     $finalTokens[$newStackPtr] = array(
757
-                                                  'content' => $token[1].':',
758
-                                                  'code'    => T_GOTO_LABEL,
759
-                                                  'type'    => 'T_GOTO_LABEL',
760
-                                                 );
757
+                                                    'content' => $token[1].':',
758
+                                                    'code'    => T_GOTO_LABEL,
759
+                                                    'type'    => 'T_GOTO_LABEL',
760
+                                                    );
761 761
 
762 762
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
763 763
                         echo "\t\t* token $stackPtr changed from T_STRING to T_GOTO_LABEL".PHP_EOL;
@@ -781,24 +781,24 @@  discard block
 block discarded – undo
781 781
                 && strtolower($token[1]) !== 'elseif'
782 782
             ) {
783 783
                 $finalTokens[$newStackPtr] = array(
784
-                                              'content' => substr($token[1], 0, 4),
785
-                                              'code'    => T_ELSE,
786
-                                              'type'    => 'T_ELSE',
787
-                                             );
784
+                                                'content' => substr($token[1], 0, 4),
785
+                                                'code'    => T_ELSE,
786
+                                                'type'    => 'T_ELSE',
787
+                                                );
788 788
 
789 789
                 $newStackPtr++;
790 790
                 $finalTokens[$newStackPtr] = array(
791
-                                              'content' => substr($token[1], 4, -2),
792
-                                              'code'    => T_WHITESPACE,
793
-                                              'type'    => 'T_WHITESPACE',
794
-                                             );
791
+                                                'content' => substr($token[1], 4, -2),
792
+                                                'code'    => T_WHITESPACE,
793
+                                                'type'    => 'T_WHITESPACE',
794
+                                                );
795 795
 
796 796
                 $newStackPtr++;
797 797
                 $finalTokens[$newStackPtr] = array(
798
-                                              'content' => substr($token[1], -2),
799
-                                              'code'    => T_IF,
800
-                                              'type'    => 'T_IF',
801
-                                             );
798
+                                                'content' => substr($token[1], -2),
799
+                                                'code'    => T_IF,
800
+                                                'type'    => 'T_IF',
801
+                                                );
802 802
 
803 803
                 if (PHP_CODESNIFFER_VERBOSITY > 1) {
804 804
                     echo "\t\t* token $stackPtr changed from T_ELSEIF to T_ELSE/T_WHITESPACE/T_IF".PHP_EOL;
@@ -815,10 +815,10 @@  discard block
 block discarded – undo
815 815
 
816 816
             if ($tokenIsArray === true && token_name($token[0]) === 'T_HASHBANG') {
817 817
                 $finalTokens[$newStackPtr] = array(
818
-                                              'content' => $token[1],
819
-                                              'code'    => T_INLINE_HTML,
820
-                                              'type'    => 'T_INLINE_HTML',
821
-                                             );
818
+                                                'content' => $token[1],
819
+                                                'code'    => T_INLINE_HTML,
820
+                                                'type'    => 'T_INLINE_HTML',
821
+                                                );
822 822
 
823 823
                 if (PHP_CODESNIFFER_VERBOSITY > 1) {
824 824
                     echo "\t\t* token $stackPtr changed from T_HASHBANG to T_INLINE_HTML".PHP_EOL;
@@ -839,10 +839,10 @@  discard block
 block discarded – undo
839 839
                 $tokenLines = explode($eolChar, $token[1]);
840 840
                 $numLines   = count($tokenLines);
841 841
                 $newToken   = array(
842
-                               'type'    => token_name($token[0]),
843
-                               'code'    => $token[0],
844
-                               'content' => '',
845
-                              );
842
+                                'type'    => token_name($token[0]),
843
+                                'code'    => $token[0],
844
+                                'content' => '',
845
+                                );
846 846
 
847 847
                 for ($i = 0; $i < $numLines; $i++) {
848 848
                     $newToken['content'] = $tokenLines[$i];
@@ -873,13 +873,13 @@  discard block
 block discarded – undo
873 873
                                 T_USE                  => true,
874 874
                                 T_NAMESPACE            => true,
875 875
                                 T_PAAMAYIM_NEKUDOTAYIM => true,
876
-                               );
876
+                                );
877 877
                     if (isset($context[$finalTokens[$lastNotEmptyToken]['code']]) === true) {
878 878
                         $finalTokens[$newStackPtr] = array(
879
-                                                      'content' => $token[1],
880
-                                                      'code'    => T_STRING,
881
-                                                      'type'    => 'T_STRING',
882
-                                                     );
879
+                                                        'content' => $token[1],
880
+                                                        'code'    => T_STRING,
881
+                                                        'type'    => 'T_STRING',
882
+                                                        );
883 883
                         $newStackPtr++;
884 884
                         continue;
885 885
                     }
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
                             T_CLOSE_PARENTHESIS    => T_CLOSE_PARENTHESIS,
1181 1181
                             T_VARIABLE             => T_VARIABLE,
1182 1182
                             T_STRING               => T_STRING,
1183
-                           );
1183
+                            );
1184 1184
 
1185 1185
                 if (isset($allowed[$tokens[$x]['code']]) === false
1186 1186
                     && isset($tokens[$i]['bracket_closer']) === true
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
                             T_OBJECT_OPERATOR      => true,
1243 1243
                             T_NS_SEPARATOR         => true,
1244 1244
                             T_PAAMAYIM_NEKUDOTAYIM => true,
1245
-                           );
1245
+                            );
1246 1246
                 if (isset($context[$tokens[$x]['code']]) === true) {
1247 1247
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
1248 1248
                         $line = $tokens[$i]['line'];
@@ -1475,13 +1475,13 @@  discard block
 block discarded – undo
1475 1475
             self::$_resolveTokenCache[$cacheKey] = $newToken;
1476 1476
         } else if ($token[0] === T_CURLY_OPEN) {
1477 1477
             $newToken = array(
1478
-                         'code' => T_OPEN_CURLY_BRACKET,
1479
-                         'type' => 'T_OPEN_CURLY_BRACKET',
1478
+                            'code' => T_OPEN_CURLY_BRACKET,
1479
+                            'type' => 'T_OPEN_CURLY_BRACKET',
1480 1480
                         );
1481 1481
         } else {
1482 1482
             $newToken = array(
1483
-                         'code' => $token[0],
1484
-                         'type' => token_name($token[0]),
1483
+                            'code' => $token[0],
1484
+                            'type' => token_name($token[0]),
1485 1485
                         );
1486 1486
 
1487 1487
             self::$_resolveTokenCache[$token[0]] = $newToken;
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/Comment.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
         $string  = ltrim($string, '/*');
59 59
 
60 60
         $tokens[$stackPtr] = array(
61
-                              'content'      => $openTag,
62
-                              'code'         => T_DOC_COMMENT_OPEN_TAG,
63
-                              'type'         => 'T_DOC_COMMENT_OPEN_TAG',
64
-                              'comment_tags' => array(),
65
-                             );
61
+                                'content'      => $openTag,
62
+                                'code'         => T_DOC_COMMENT_OPEN_TAG,
63
+                                'type'         => 'T_DOC_COMMENT_OPEN_TAG',
64
+                                'comment_tags' => array(),
65
+                                );
66 66
 
67 67
         $openPtr = $stackPtr;
68 68
         $stackPtr++;
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
         */
80 80
 
81 81
         $closeTag = array(
82
-                     'content'        => substr($string, strlen(rtrim($string, '/*'))),
83
-                     'code'           => T_DOC_COMMENT_CLOSE_TAG,
84
-                     'type'           => 'T_DOC_COMMENT_CLOSE_TAG',
85
-                     'comment_opener' => $openPtr,
82
+                        'content'        => substr($string, strlen(rtrim($string, '/*'))),
83
+                        'code'           => T_DOC_COMMENT_CLOSE_TAG,
84
+                        'type'           => 'T_DOC_COMMENT_CLOSE_TAG',
85
+                        'comment_opener' => $openPtr,
86 86
                     );
87 87
 
88 88
         $string = rtrim($string, '/*');
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                 // This is a function or class doc block line.
126 126
                 $char++;
127 127
                 $tokens[$stackPtr] = array(
128
-                                      'content' => '*',
129
-                                      'code'    => T_DOC_COMMENT_STAR,
130
-                                      'type'    => 'T_DOC_COMMENT_STAR',
131
-                                     );
128
+                                        'content' => '*',
129
+                                        'code'    => T_DOC_COMMENT_STAR,
130
+                                        'type'    => 'T_DOC_COMMENT_STAR',
131
+                                        );
132 132
 
133 133
                 $stackPtr++;
134 134
 
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
                 $tagName  = $matches[0];
205 205
                 $start   += strlen($tagName);
206 206
                 $tokens[] = array(
207
-                             'content' => $tagName,
208
-                             'code'    => T_DOC_COMMENT_TAG,
209
-                             'type'    => 'T_DOC_COMMENT_TAG',
207
+                                'content' => $tagName,
208
+                                'code'    => T_DOC_COMMENT_TAG,
209
+                                'type'    => 'T_DOC_COMMENT_TAG',
210 210
                             );
211 211
 
212 212
                 // Then there will be some whitespace.
@@ -226,17 +226,17 @@  discard block
 block discarded – undo
226 226
 
227 227
         if ($eol > $start) {
228 228
             $tokens[] = array(
229
-                         'content' => substr($string, $start, ($eol - $start)),
230
-                         'code'    => T_DOC_COMMENT_STRING,
231
-                         'type'    => 'T_DOC_COMMENT_STRING',
229
+                            'content' => substr($string, $start, ($eol - $start)),
230
+                            'code'    => T_DOC_COMMENT_STRING,
231
+                            'type'    => 'T_DOC_COMMENT_STRING',
232 232
                         );
233 233
         }
234 234
 
235 235
         if ($eol !== $end) {
236 236
             $tokens[] = array(
237
-                         'content' => substr($string, $eol, strlen($eolChar)),
238
-                         'code'    => T_DOC_COMMENT_WHITESPACE,
239
-                         'type'    => 'T_DOC_COMMENT_WHITESPACE',
237
+                            'content' => substr($string, $eol, strlen($eolChar)),
238
+                            'code'    => T_DOC_COMMENT_WHITESPACE,
239
+                            'type'    => 'T_DOC_COMMENT_WHITESPACE',
240 240
                         );
241 241
         }
242 242
 
@@ -270,10 +270,10 @@  discard block
 block discarded – undo
270 270
         }
271 271
 
272 272
         $token = array(
273
-                  'content' => $space,
274
-                  'code'    => T_DOC_COMMENT_WHITESPACE,
275
-                  'type'    => 'T_DOC_COMMENT_WHITESPACE',
276
-                 );
273
+                    'content' => $space,
274
+                    'code'    => T_DOC_COMMENT_WHITESPACE,
275
+                    'type'    => 'T_DOC_COMMENT_WHITESPACE',
276
+                    );
277 277
 
278 278
         return $token;
279 279
 
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/JS.php 1 patch
Indentation   +197 added lines, -197 removed lines patch added patch discarded remove patch
@@ -46,100 +46,100 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public $scopeOpeners = array(
48 48
                             T_IF       => array(
49
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
50
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
51
-                                           'strict' => false,
52
-                                           'shared' => false,
53
-                                           'with'   => array(),
54
-                                          ),
49
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
50
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
51
+                                            'strict' => false,
52
+                                            'shared' => false,
53
+                                            'with'   => array(),
54
+                                            ),
55 55
                             T_TRY      => array(
56
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
57
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
58
-                                           'strict' => true,
59
-                                           'shared' => false,
60
-                                           'with'   => array(),
61
-                                          ),
56
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
57
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
58
+                                            'strict' => true,
59
+                                            'shared' => false,
60
+                                            'with'   => array(),
61
+                                            ),
62 62
                             T_CATCH    => array(
63
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
64
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
65
-                                           'strict' => true,
66
-                                           'shared' => false,
67
-                                           'with'   => array(),
68
-                                          ),
63
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
64
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
65
+                                            'strict' => true,
66
+                                            'shared' => false,
67
+                                            'with'   => array(),
68
+                                            ),
69 69
                             T_ELSE     => array(
70
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
71
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
72
-                                           'strict' => false,
73
-                                           'shared' => false,
74
-                                           'with'   => array(),
75
-                                          ),
70
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
71
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
72
+                                            'strict' => false,
73
+                                            'shared' => false,
74
+                                            'with'   => array(),
75
+                                            ),
76 76
                             T_FOR      => array(
77
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
78
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
79
-                                           'strict' => false,
80
-                                           'shared' => false,
81
-                                           'with'   => array(),
82
-                                          ),
77
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
78
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
79
+                                            'strict' => false,
80
+                                            'shared' => false,
81
+                                            'with'   => array(),
82
+                                            ),
83 83
                             T_FUNCTION => array(
84
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
85
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
86
-                                           'strict' => false,
87
-                                           'shared' => false,
88
-                                           'with'   => array(),
89
-                                          ),
84
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
85
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
86
+                                            'strict' => false,
87
+                                            'shared' => false,
88
+                                            'with'   => array(),
89
+                                            ),
90 90
                             T_WHILE    => array(
91
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
92
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
93
-                                           'strict' => false,
94
-                                           'shared' => false,
95
-                                           'with'   => array(),
96
-                                          ),
91
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
92
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
93
+                                            'strict' => false,
94
+                                            'shared' => false,
95
+                                            'with'   => array(),
96
+                                            ),
97 97
                             T_DO       => array(
98
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
99
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
100
-                                           'strict' => true,
101
-                                           'shared' => false,
102
-                                           'with'   => array(),
103
-                                          ),
98
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
99
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
100
+                                            'strict' => true,
101
+                                            'shared' => false,
102
+                                            'with'   => array(),
103
+                                            ),
104 104
                             T_SWITCH   => array(
105
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
106
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
107
-                                           'strict' => true,
108
-                                           'shared' => false,
109
-                                           'with'   => array(),
110
-                                          ),
105
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
106
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
107
+                                            'strict' => true,
108
+                                            'shared' => false,
109
+                                            'with'   => array(),
110
+                                            ),
111 111
                             T_CASE     => array(
112
-                                           'start'  => array(T_COLON => T_COLON),
113
-                                           'end'    => array(
112
+                                            'start'  => array(T_COLON => T_COLON),
113
+                                            'end'    => array(
114 114
                                                         T_BREAK    => T_BREAK,
115 115
                                                         T_RETURN   => T_RETURN,
116 116
                                                         T_CONTINUE => T_CONTINUE,
117 117
                                                         T_THROW    => T_THROW,
118
-                                                       ),
119
-                                           'strict' => true,
120
-                                           'shared' => true,
121
-                                           'with'   => array(
118
+                                                        ),
119
+                                            'strict' => true,
120
+                                            'shared' => true,
121
+                                            'with'   => array(
122 122
                                                         T_DEFAULT => T_DEFAULT,
123 123
                                                         T_CASE    => T_CASE,
124 124
                                                         T_SWITCH  => T_SWITCH,
125
-                                                       ),
126
-                                          ),
125
+                                                        ),
126
+                                            ),
127 127
                             T_DEFAULT  => array(
128
-                                           'start'  => array(T_COLON => T_COLON),
129
-                                           'end'    => array(
128
+                                            'start'  => array(T_COLON => T_COLON),
129
+                                            'end'    => array(
130 130
                                                         T_BREAK    => T_BREAK,
131 131
                                                         T_RETURN   => T_RETURN,
132 132
                                                         T_CONTINUE => T_CONTINUE,
133 133
                                                         T_THROW    => T_THROW,
134
-                                                       ),
135
-                                           'strict' => true,
136
-                                           'shared' => true,
137
-                                           'with'   => array(
134
+                                                        ),
135
+                                            'strict' => true,
136
+                                            'shared' => true,
137
+                                            'with'   => array(
138 138
                                                         T_CASE   => T_CASE,
139 139
                                                         T_SWITCH => T_SWITCH,
140
-                                                       ),
141
-                                          ),
142
-                           );
140
+                                                        ),
141
+                                            ),
142
+                            );
143 143
 
144 144
     /**
145 145
      * A list of tokens that end the scope.
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
      * @var array
152 152
      */
153 153
     public $endScopeTokens = array(
154
-                              T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
155
-                              T_BREAK               => T_BREAK,
156
-                             );
154
+                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
155
+                                T_BREAK               => T_BREAK,
156
+                                );
157 157
 
158 158
     /**
159 159
      * A list of special JS tokens and their types.
@@ -161,71 +161,71 @@  discard block
 block discarded – undo
161 161
      * @var array
162 162
      */
163 163
     protected $tokenValues = array(
164
-                              'function'  => 'T_FUNCTION',
165
-                              'prototype' => 'T_PROTOTYPE',
166
-                              'try'       => 'T_TRY',
167
-                              'catch'     => 'T_CATCH',
168
-                              'return'    => 'T_RETURN',
169
-                              'throw'     => 'T_THROW',
170
-                              'break'     => 'T_BREAK',
171
-                              'switch'    => 'T_SWITCH',
172
-                              'continue'  => 'T_CONTINUE',
173
-                              'if'        => 'T_IF',
174
-                              'else'      => 'T_ELSE',
175
-                              'do'        => 'T_DO',
176
-                              'while'     => 'T_WHILE',
177
-                              'for'       => 'T_FOR',
178
-                              'var'       => 'T_VAR',
179
-                              'case'      => 'T_CASE',
180
-                              'default'   => 'T_DEFAULT',
181
-                              'true'      => 'T_TRUE',
182
-                              'false'     => 'T_FALSE',
183
-                              'null'      => 'T_NULL',
184
-                              'this'      => 'T_THIS',
185
-                              'typeof'    => 'T_TYPEOF',
186
-                              '('         => 'T_OPEN_PARENTHESIS',
187
-                              ')'         => 'T_CLOSE_PARENTHESIS',
188
-                              '{'         => 'T_OPEN_CURLY_BRACKET',
189
-                              '}'         => 'T_CLOSE_CURLY_BRACKET',
190
-                              '['         => 'T_OPEN_SQUARE_BRACKET',
191
-                              ']'         => 'T_CLOSE_SQUARE_BRACKET',
192
-                              '?'         => 'T_INLINE_THEN',
193
-                              '.'         => 'T_OBJECT_OPERATOR',
194
-                              '+'         => 'T_PLUS',
195
-                              '-'         => 'T_MINUS',
196
-                              '*'         => 'T_MULTIPLY',
197
-                              '%'         => 'T_MODULUS',
198
-                              '/'         => 'T_DIVIDE',
199
-                              '^'         => 'T_LOGICAL_XOR',
200
-                              ','         => 'T_COMMA',
201
-                              ';'         => 'T_SEMICOLON',
202
-                              ':'         => 'T_COLON',
203
-                              '<'         => 'T_LESS_THAN',
204
-                              '>'         => 'T_GREATER_THAN',
205
-                              '<='        => 'T_IS_SMALLER_OR_EQUAL',
206
-                              '>='        => 'T_IS_GREATER_OR_EQUAL',
207
-                              '!'         => 'T_BOOLEAN_NOT',
208
-                              '||'        => 'T_BOOLEAN_OR',
209
-                              '&&'        => 'T_BOOLEAN_AND',
210
-                              '|'         => 'T_BITWISE_OR',
211
-                              '&'         => 'T_BITWISE_AND',
212
-                              '!='        => 'T_IS_NOT_EQUAL',
213
-                              '!=='       => 'T_IS_NOT_IDENTICAL',
214
-                              '='         => 'T_EQUAL',
215
-                              '=='        => 'T_IS_EQUAL',
216
-                              '==='       => 'T_IS_IDENTICAL',
217
-                              '-='        => 'T_MINUS_EQUAL',
218
-                              '+='        => 'T_PLUS_EQUAL',
219
-                              '*='        => 'T_MUL_EQUAL',
220
-                              '/='        => 'T_DIV_EQUAL',
221
-                              '%='        => 'T_MOD_EQUAL',
222
-                              '++'        => 'T_INC',
223
-                              '--'        => 'T_DEC',
224
-                              '//'        => 'T_COMMENT',
225
-                              '/*'        => 'T_COMMENT',
226
-                              '/**'       => 'T_DOC_COMMENT',
227
-                              '*/'        => 'T_COMMENT',
228
-                             );
164
+                                'function'  => 'T_FUNCTION',
165
+                                'prototype' => 'T_PROTOTYPE',
166
+                                'try'       => 'T_TRY',
167
+                                'catch'     => 'T_CATCH',
168
+                                'return'    => 'T_RETURN',
169
+                                'throw'     => 'T_THROW',
170
+                                'break'     => 'T_BREAK',
171
+                                'switch'    => 'T_SWITCH',
172
+                                'continue'  => 'T_CONTINUE',
173
+                                'if'        => 'T_IF',
174
+                                'else'      => 'T_ELSE',
175
+                                'do'        => 'T_DO',
176
+                                'while'     => 'T_WHILE',
177
+                                'for'       => 'T_FOR',
178
+                                'var'       => 'T_VAR',
179
+                                'case'      => 'T_CASE',
180
+                                'default'   => 'T_DEFAULT',
181
+                                'true'      => 'T_TRUE',
182
+                                'false'     => 'T_FALSE',
183
+                                'null'      => 'T_NULL',
184
+                                'this'      => 'T_THIS',
185
+                                'typeof'    => 'T_TYPEOF',
186
+                                '('         => 'T_OPEN_PARENTHESIS',
187
+                                ')'         => 'T_CLOSE_PARENTHESIS',
188
+                                '{'         => 'T_OPEN_CURLY_BRACKET',
189
+                                '}'         => 'T_CLOSE_CURLY_BRACKET',
190
+                                '['         => 'T_OPEN_SQUARE_BRACKET',
191
+                                ']'         => 'T_CLOSE_SQUARE_BRACKET',
192
+                                '?'         => 'T_INLINE_THEN',
193
+                                '.'         => 'T_OBJECT_OPERATOR',
194
+                                '+'         => 'T_PLUS',
195
+                                '-'         => 'T_MINUS',
196
+                                '*'         => 'T_MULTIPLY',
197
+                                '%'         => 'T_MODULUS',
198
+                                '/'         => 'T_DIVIDE',
199
+                                '^'         => 'T_LOGICAL_XOR',
200
+                                ','         => 'T_COMMA',
201
+                                ';'         => 'T_SEMICOLON',
202
+                                ':'         => 'T_COLON',
203
+                                '<'         => 'T_LESS_THAN',
204
+                                '>'         => 'T_GREATER_THAN',
205
+                                '<='        => 'T_IS_SMALLER_OR_EQUAL',
206
+                                '>='        => 'T_IS_GREATER_OR_EQUAL',
207
+                                '!'         => 'T_BOOLEAN_NOT',
208
+                                '||'        => 'T_BOOLEAN_OR',
209
+                                '&&'        => 'T_BOOLEAN_AND',
210
+                                '|'         => 'T_BITWISE_OR',
211
+                                '&'         => 'T_BITWISE_AND',
212
+                                '!='        => 'T_IS_NOT_EQUAL',
213
+                                '!=='       => 'T_IS_NOT_IDENTICAL',
214
+                                '='         => 'T_EQUAL',
215
+                                '=='        => 'T_IS_EQUAL',
216
+                                '==='       => 'T_IS_IDENTICAL',
217
+                                '-='        => 'T_MINUS_EQUAL',
218
+                                '+='        => 'T_PLUS_EQUAL',
219
+                                '*='        => 'T_MUL_EQUAL',
220
+                                '/='        => 'T_DIV_EQUAL',
221
+                                '%='        => 'T_MOD_EQUAL',
222
+                                '++'        => 'T_INC',
223
+                                '--'        => 'T_DEC',
224
+                                '//'        => 'T_COMMENT',
225
+                                '/*'        => 'T_COMMENT',
226
+                                '/**'       => 'T_DOC_COMMENT',
227
+                                '*/'        => 'T_COMMENT',
228
+                                );
229 229
 
230 230
     /**
231 231
      * A list string delimiters.
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
      * @var array
234 234
      */
235 235
     protected $stringTokens = array(
236
-                               '\'' => '\'',
237
-                               '"'  => '"',
238
-                              );
236
+                                '\'' => '\'',
237
+                                '"'  => '"',
238
+                                );
239 239
 
240 240
     /**
241 241
      * A list tokens that start and end comments.
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                                 '//'  => null,
247 247
                                 '/*'  => '*/',
248 248
                                 '/**' => '*/',
249
-                               );
249
+                                );
250 250
 
251 251
 
252 252
     /**
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
         $commentTokenizer = new PHP_CodeSniffer_Tokenizers_Comment();
285 285
 
286 286
         $tokens[] = array(
287
-                     'code'    => T_OPEN_TAG,
288
-                     'type'    => 'T_OPEN_TAG',
289
-                     'content' => '',
287
+                        'code'    => T_OPEN_TAG,
288
+                        'type'    => 'T_OPEN_TAG',
289
+                        'content' => '',
290 290
                     );
291 291
 
292 292
         // Convert newlines to single characters for ease of
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
                 // add a character, store the whitespace first.
319 319
                 if (trim($char) !== '' && trim($buffer) === '') {
320 320
                     $tokens[] = array(
321
-                                 'code'    => T_WHITESPACE,
322
-                                 'type'    => 'T_WHITESPACE',
323
-                                 'content' => str_replace("\n", $eolChar, $buffer),
321
+                                    'code'    => T_WHITESPACE,
322
+                                    'type'    => 'T_WHITESPACE',
323
+                                    'content' => str_replace("\n", $eolChar, $buffer),
324 324
                                 );
325 325
 
326 326
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -339,9 +339,9 @@  discard block
 block discarded – undo
339 339
                     && trim($buffer) !== ''
340 340
                 ) {
341 341
                     $tokens[] = array(
342
-                                 'code'    => T_STRING,
343
-                                 'type'    => 'T_STRING',
344
-                                 'content' => str_replace("\n", $eolChar, $buffer),
342
+                                    'code'    => T_STRING,
343
+                                    'type'    => 'T_STRING',
344
+                                    'content' => str_replace("\n", $eolChar, $buffer),
345 345
                                 );
346 346
 
347 347
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -371,9 +371,9 @@  discard block
 block discarded – undo
371 371
                         // There is an even number escape chars,
372 372
                         // so this is not escaped, it is the end of the string.
373 373
                         $tokens[] = array(
374
-                                     'code'    => T_CONSTANT_ENCAPSED_STRING,
375
-                                     'type'    => 'T_CONSTANT_ENCAPSED_STRING',
376
-                                     'content' => str_replace("\n", $eolChar, $buffer).$char,
374
+                                        'code'    => T_CONSTANT_ENCAPSED_STRING,
375
+                                        'type'    => 'T_CONSTANT_ENCAPSED_STRING',
376
+                                        'content' => str_replace("\n", $eolChar, $buffer).$char,
377 377
                                     );
378 378
 
379 379
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -439,9 +439,9 @@  discard block
 block discarded – undo
439 439
 
440 440
                 if ($regex !== null) {
441 441
                     $tokens[] = array(
442
-                                 'code'    => T_REGULAR_EXPRESSION,
443
-                                 'type'    => 'T_REGULAR_EXPRESSION',
444
-                                 'content' => $regex['content'],
442
+                                    'code'    => T_REGULAR_EXPRESSION,
443
+                                    'type'    => 'T_REGULAR_EXPRESSION',
444
+                                    'content' => $regex['content'],
445 445
                                 );
446 446
 
447 447
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -521,9 +521,9 @@  discard block
 block discarded – undo
521 521
 
522 522
                     $value    = $this->tokenValues[strtolower($buffer)];
523 523
                     $tokens[] = array(
524
-                                 'code'    => constant($value),
525
-                                 'type'    => $value,
526
-                                 'content' => $buffer,
524
+                                    'code'    => constant($value),
525
+                                    'type'    => $value,
526
+                                    'content' => $buffer,
527 527
                                 );
528 528
 
529 529
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -540,9 +540,9 @@  discard block
 block discarded – undo
540 540
                 $newContent = substr(str_replace("\n", $eolChar, $buffer), 0, -1);
541 541
                 if ($newContent !== '') {
542 542
                     $tokens[] = array(
543
-                                 'code'    => T_STRING,
544
-                                 'type'    => 'T_STRING',
545
-                                 'content' => $newContent,
543
+                                    'code'    => T_STRING,
544
+                                    'type'    => 'T_STRING',
545
+                                    'content' => $newContent,
546 546
                                 );
547 547
 
548 548
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -588,9 +588,9 @@  discard block
 block discarded – undo
588 588
                 if ($matchedToken === false) {
589 589
                     $value    = $this->tokenValues[strtolower($char)];
590 590
                     $tokens[] = array(
591
-                                 'code'    => constant($value),
592
-                                 'type'    => $value,
593
-                                 'content' => $char,
591
+                                    'code'    => constant($value),
592
+                                    'type'    => $value,
593
+                                    'content' => $char,
594 594
                                 );
595 595
 
596 596
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -626,9 +626,9 @@  discard block
 block discarded – undo
626 626
                         $lastChar = $lastChars[$x];
627 627
                         $value    = $this->tokenValues[strtolower($lastChar)];
628 628
                         $tokens[] = array(
629
-                                     'code'    => constant($value),
630
-                                     'type'    => $value,
631
-                                     'content' => $lastChar,
629
+                                        'code'    => constant($value),
630
+                                        'type'    => $value,
631
+                                        'content' => $lastChar,
632 632
                                     );
633 633
 
634 634
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -664,9 +664,9 @@  discard block
 block discarded – undo
664 664
 
665 665
                 if ($inComment === '' && $cleanBuffer === false) {
666 666
                     $tokens[] = array(
667
-                                 'code'    => T_STRING,
668
-                                 'type'    => 'T_STRING',
669
-                                 'content' => str_replace("\n", $eolChar, $buffer),
667
+                                    'code'    => T_STRING,
668
+                                    'type'    => 'T_STRING',
669
+                                    'content' => str_replace("\n", $eolChar, $buffer),
670 670
                                 );
671 671
 
672 672
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -687,9 +687,9 @@  discard block
 block discarded – undo
687 687
         if (empty($buffer) === false) {
688 688
             // Buffer contains whitespace from the end of the file.
689 689
             $tokens[] = array(
690
-                         'code'    => T_WHITESPACE,
691
-                         'type'    => 'T_WHITESPACE',
692
-                         'content' => str_replace("\n", $eolChar, $buffer),
690
+                            'code'    => T_WHITESPACE,
691
+                            'type'    => 'T_WHITESPACE',
692
+                            'content' => str_replace("\n", $eolChar, $buffer),
693 693
                         );
694 694
 
695 695
             if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -699,9 +699,9 @@  discard block
 block discarded – undo
699 699
         }
700 700
 
701 701
         $tokens[] = array(
702
-                     'code'    => T_CLOSE_TAG,
703
-                     'type'    => 'T_CLOSE_TAG',
704
-                     'content' => '',
702
+                        'code'    => T_CLOSE_TAG,
703
+                        'type'    => 'T_CLOSE_TAG',
704
+                        'content' => '',
705 705
                     );
706 706
 
707 707
         /*
@@ -880,19 +880,19 @@  discard block
 block discarded – undo
880 880
     public function getRegexToken($char, $string, $chars, $tokens, $eolChar)
881 881
     {
882 882
         $beforeTokens = array(
883
-                         T_EQUAL               => true,
884
-                         T_OPEN_PARENTHESIS    => true,
885
-                         T_OPEN_SQUARE_BRACKET => true,
886
-                         T_RETURN              => true,
887
-                         T_BOOLEAN_OR          => true,
888
-                         T_BOOLEAN_AND         => true,
889
-                         T_BITWISE_OR          => true,
890
-                         T_BITWISE_AND         => true,
891
-                         T_COMMA               => true,
892
-                         T_COLON               => true,
893
-                         T_TYPEOF              => true,
894
-                         T_INLINE_THEN         => true,
895
-                         T_INLINE_ELSE         => true,
883
+                            T_EQUAL               => true,
884
+                            T_OPEN_PARENTHESIS    => true,
885
+                            T_OPEN_SQUARE_BRACKET => true,
886
+                            T_RETURN              => true,
887
+                            T_BOOLEAN_OR          => true,
888
+                            T_BOOLEAN_AND         => true,
889
+                            T_BITWISE_OR          => true,
890
+                            T_BITWISE_AND         => true,
891
+                            T_COMMA               => true,
892
+                            T_COLON               => true,
893
+                            T_TYPEOF              => true,
894
+                            T_INLINE_THEN         => true,
895
+                            T_INLINE_ELSE         => true,
896 896
                         );
897 897
 
898 898
         $afterTokens = array(
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
                         '.'      => true,
905 905
                         ':'      => true,
906 906
                         $eolChar => true,
907
-                       );
907
+                        );
908 908
 
909 909
         // Find the last non-whitespace token that was added
910 910
         // to the tokens array.
@@ -993,10 +993,10 @@  discard block
 block discarded – undo
993 993
         }
994 994
 
995 995
         $token = array(
996
-                  'start'   => $char,
997
-                  'end'     => $regexEnd,
998
-                  'content' => $content,
999
-                 );
996
+                    'start'   => $char,
997
+                    'end'     => $regexEnd,
998
+                    'content' => $content,
999
+                    );
1000 1000
 
1001 1001
         return $token;
1002 1002
 
Please login to merge, or discard this patch.
CodeSniffer/Reporting.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         return array(
286 286
                 'errors'   => $this->totalErrors,
287 287
                 'warnings' => $this->totalWarnings,
288
-               );
288
+                );
289 289
 
290 290
     }//end printReport()
291 291
 
@@ -302,12 +302,12 @@  discard block
 block discarded – undo
302 302
     public function prepareFileReport(PHP_CodeSniffer_File $phpcsFile)
303 303
     {
304 304
         $report = array(
305
-                   'filename' => $phpcsFile->getFilename(),
306
-                   'errors'   => $phpcsFile->getErrorCount(),
307
-                   'warnings' => $phpcsFile->getWarningCount(),
308
-                   'fixable'  => $phpcsFile->getFixableCount(),
309
-                   'messages' => array(),
310
-                  );
305
+                    'filename' => $phpcsFile->getFilename(),
306
+                    'errors'   => $phpcsFile->getErrorCount(),
307
+                    'warnings' => $phpcsFile->getWarningCount(),
308
+                    'fixable'  => $phpcsFile->getFixableCount(),
309
+                    'messages' => array(),
310
+                    );
311 311
 
312 312
         if ($report['errors'] === 0 && $report['warnings'] === 0) {
313 313
             // Prefect score!
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                                     'severity' => $data['severity'],
332 332
                                     'fixable'  => $data['fixable'],
333 333
                                     'type'     => 'ERROR',
334
-                                   );
334
+                                    );
335 335
                 }//end foreach
336 336
 
337 337
                 $errors[$line][$column] = $newErrors;
@@ -349,12 +349,12 @@  discard block
 block discarded – undo
349 349
                 $newWarnings = array();
350 350
                 foreach ($colWarnings as $data) {
351 351
                     $newWarnings[] = array(
352
-                                      'message'  => $data['message'],
353
-                                      'source'   => $data['source'],
354
-                                      'severity' => $data['severity'],
355
-                                      'fixable'  => $data['fixable'],
356
-                                      'type'     => 'WARNING',
357
-                                     );
352
+                                        'message'  => $data['message'],
353
+                                        'source'   => $data['source'],
354
+                                        'severity' => $data['severity'],
355
+                                        'fixable'  => $data['fixable'],
356
+                                        'type'     => 'WARNING',
357
+                                        );
358 358
                 }//end foreach
359 359
 
360 360
                 if (isset($errors[$line]) === false) {
Please login to merge, or discard this patch.
CodeSniffer/Fixer.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -529,9 +529,9 @@
 block discarded – undo
529 529
 
530 530
         if (isset($this->_oldTokenValues[$stackPtr]) === false) {
531 531
             $this->_oldTokenValues[$stackPtr] = array(
532
-                                                 'curr' => $content,
533
-                                                 'prev' => $this->_tokens[$stackPtr],
534
-                                                 'loop' => $this->loops,
532
+                                                    'curr' => $content,
533
+                                                    'prev' => $this->_tokens[$stackPtr],
534
+                                                    'loop' => $this->loops,
535 535
                                                 );
536 536
         } else {
537 537
             if ($this->_oldTokenValues[$stackPtr]['prev'] === $content
Please login to merge, or discard this patch.
CodeSniffer/File.php 1 patch
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -1045,8 +1045,8 @@  discard block
 block discarded – undo
1045 1045
             // While there is support for a type of each pattern
1046 1046
             // (absolute or relative) we don't actually support it here.
1047 1047
             $replacements = array(
1048
-                             '\\,' => ',',
1049
-                             '*'   => '.*',
1048
+                                '\\,' => ',',
1049
+                                '*'   => '.*',
1050 1050
                             );
1051 1051
 
1052 1052
             // We assume a / directory separator, as do the exclude rules
@@ -1101,7 +1101,7 @@  discard block
 block discarded – undo
1101 1101
                                             'source'   => $sniffCode,
1102 1102
                                             'severity' => $severity,
1103 1103
                                             'fixable'  => $fixable,
1104
-                                           );
1104
+                                            );
1105 1105
 
1106 1106
         if (PHP_CODESNIFFER_VERBOSITY > 1
1107 1107
             && $this->fixer->enabled === true
@@ -1192,8 +1192,8 @@  discard block
 block discarded – undo
1192 1192
             // While there is support for a type of each pattern
1193 1193
             // (absolute or relative) we don't actually support it here.
1194 1194
             $replacements = array(
1195
-                             '\\,' => ',',
1196
-                             '*'   => '.*',
1195
+                                '\\,' => ',',
1196
+                                '*'   => '.*',
1197 1197
                             );
1198 1198
 
1199 1199
             // We assume a / directory separator, as do the exclude rules
@@ -1244,11 +1244,11 @@  discard block
 block discarded – undo
1244 1244
         }
1245 1245
 
1246 1246
         $this->_warnings[$line][$column][] = array(
1247
-                                              'message'  => $message,
1248
-                                              'source'   => $sniffCode,
1249
-                                              'severity' => $severity,
1250
-                                              'fixable'  => $fixable,
1251
-                                             );
1247
+                                                'message'  => $message,
1248
+                                                'source'   => $sniffCode,
1249
+                                                'severity' => $severity,
1250
+                                                'fixable'  => $fixable,
1251
+                                                );
1252 1252
 
1253 1253
         if (PHP_CODESNIFFER_VERBOSITY > 1
1254 1254
             && $this->fixer->enabled === true
@@ -1278,9 +1278,9 @@  discard block
 block discarded – undo
1278 1278
         if (isset($this->_metrics[$metric]) === false) {
1279 1279
             $this->_metrics[$metric] = array(
1280 1280
                                         'values' => array(
1281
-                                                     $value => array($stackPtr),
1281
+                                                        $value => array($stackPtr),
1282 1282
                                                     ),
1283
-                                       );
1283
+                                        );
1284 1284
         } else {
1285 1285
             if (isset($this->_metrics[$metric]['values'][$value]) === false) {
1286 1286
                 $this->_metrics[$metric]['values'][$value] = array($stackPtr);
@@ -1487,17 +1487,17 @@  discard block
 block discarded – undo
1487 1487
         }
1488 1488
 
1489 1489
         $tokensWithTabs = array(
1490
-                           T_WHITESPACE               => true,
1491
-                           T_COMMENT                  => true,
1492
-                           T_DOC_COMMENT              => true,
1493
-                           T_DOC_COMMENT_WHITESPACE   => true,
1494
-                           T_DOC_COMMENT_STRING       => true,
1495
-                           T_CONSTANT_ENCAPSED_STRING => true,
1496
-                           T_DOUBLE_QUOTED_STRING     => true,
1497
-                           T_HEREDOC                  => true,
1498
-                           T_NOWDOC                   => true,
1499
-                           T_INLINE_HTML              => true,
1500
-                          );
1490
+                            T_WHITESPACE               => true,
1491
+                            T_COMMENT                  => true,
1492
+                            T_DOC_COMMENT              => true,
1493
+                            T_DOC_COMMENT_WHITESPACE   => true,
1494
+                            T_DOC_COMMENT_STRING       => true,
1495
+                            T_CONSTANT_ENCAPSED_STRING => true,
1496
+                            T_DOUBLE_QUOTED_STRING     => true,
1497
+                            T_HEREDOC                  => true,
1498
+                            T_NOWDOC                   => true,
1499
+                            T_INLINE_HTML              => true,
1500
+                            );
1501 1501
 
1502 1502
         $numTokens = count($tokens);
1503 1503
         for ($i = 0; $i < $numTokens; $i++) {
@@ -1997,7 +1997,7 @@  discard block
 block discarded – undo
1997 1997
                     $todo        = array(
1998 1998
                                     $stackPtr,
1999 1999
                                     $opener,
2000
-                                   );
2000
+                                    );
2001 2001
 
2002 2002
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
2003 2003
                         $type       = $tokens[$stackPtr]['type'];
@@ -2906,16 +2906,16 @@  discard block
 block discarded – undo
2906 2906
         }
2907 2907
 
2908 2908
         $valid = array(
2909
-                  T_PUBLIC      => T_PUBLIC,
2910
-                  T_PRIVATE     => T_PRIVATE,
2911
-                  T_PROTECTED   => T_PROTECTED,
2912
-                  T_STATIC      => T_STATIC,
2913
-                  T_FINAL       => T_FINAL,
2914
-                  T_ABSTRACT    => T_ABSTRACT,
2915
-                  T_WHITESPACE  => T_WHITESPACE,
2916
-                  T_COMMENT     => T_COMMENT,
2917
-                  T_DOC_COMMENT => T_DOC_COMMENT,
2918
-                 );
2909
+                    T_PUBLIC      => T_PUBLIC,
2910
+                    T_PRIVATE     => T_PRIVATE,
2911
+                    T_PROTECTED   => T_PROTECTED,
2912
+                    T_STATIC      => T_STATIC,
2913
+                    T_FINAL       => T_FINAL,
2914
+                    T_ABSTRACT    => T_ABSTRACT,
2915
+                    T_WHITESPACE  => T_WHITESPACE,
2916
+                    T_COMMENT     => T_COMMENT,
2917
+                    T_DOC_COMMENT => T_DOC_COMMENT,
2918
+                    );
2919 2919
 
2920 2920
         $scope          = 'public';
2921 2921
         $scopeSpecified = false;
@@ -2961,7 +2961,7 @@  discard block
 block discarded – undo
2961 2961
                 'is_final'        => $isFinal,
2962 2962
                 'is_static'       => $isStatic,
2963 2963
                 'is_closure'      => $isClosure,
2964
-               );
2964
+                );
2965 2965
 
2966 2966
     }//end getMethodProperties()
2967 2967
 
@@ -3019,16 +3019,16 @@  discard block
 block discarded – undo
3019 3019
         }
3020 3020
 
3021 3021
         $valid = array(
3022
-                  T_PUBLIC      => T_PUBLIC,
3023
-                  T_PRIVATE     => T_PRIVATE,
3024
-                  T_PROTECTED   => T_PROTECTED,
3025
-                  T_STATIC      => T_STATIC,
3026
-                  T_WHITESPACE  => T_WHITESPACE,
3027
-                  T_COMMENT     => T_COMMENT,
3028
-                  T_DOC_COMMENT => T_DOC_COMMENT,
3029
-                  T_VARIABLE    => T_VARIABLE,
3030
-                  T_COMMA       => T_COMMA,
3031
-                 );
3022
+                    T_PUBLIC      => T_PUBLIC,
3023
+                    T_PRIVATE     => T_PRIVATE,
3024
+                    T_PROTECTED   => T_PROTECTED,
3025
+                    T_STATIC      => T_STATIC,
3026
+                    T_WHITESPACE  => T_WHITESPACE,
3027
+                    T_COMMENT     => T_COMMENT,
3028
+                    T_DOC_COMMENT => T_DOC_COMMENT,
3029
+                    T_VARIABLE    => T_VARIABLE,
3030
+                    T_COMMA       => T_COMMA,
3031
+                    );
3032 3032
 
3033 3033
         $scope          = 'public';
3034 3034
         $scopeSpecified = false;
@@ -3062,7 +3062,7 @@  discard block
 block discarded – undo
3062 3062
                 'scope'           => $scope,
3063 3063
                 'scope_specified' => $scopeSpecified,
3064 3064
                 'is_static'       => $isStatic,
3065
-               );
3065
+                );
3066 3066
 
3067 3067
     }//end getMemberProperties()
3068 3068
 
@@ -3092,12 +3092,12 @@  discard block
 block discarded – undo
3092 3092
         }
3093 3093
 
3094 3094
         $valid = array(
3095
-                  T_FINAL       => T_FINAL,
3096
-                  T_ABSTRACT    => T_ABSTRACT,
3097
-                  T_WHITESPACE  => T_WHITESPACE,
3098
-                  T_COMMENT     => T_COMMENT,
3099
-                  T_DOC_COMMENT => T_DOC_COMMENT,
3100
-                 );
3095
+                    T_FINAL       => T_FINAL,
3096
+                    T_ABSTRACT    => T_ABSTRACT,
3097
+                    T_WHITESPACE  => T_WHITESPACE,
3098
+                    T_COMMENT     => T_COMMENT,
3099
+                    T_DOC_COMMENT => T_DOC_COMMENT,
3100
+                    );
3101 3101
 
3102 3102
         $isAbstract = false;
3103 3103
         $isFinal    = false;
@@ -3121,7 +3121,7 @@  discard block
 block discarded – undo
3121 3121
         return array(
3122 3122
                 'is_abstract' => $isAbstract,
3123 3123
                 'is_final'    => $isFinal,
3124
-               );
3124
+                );
3125 3125
 
3126 3126
     }//end getClassProperties()
3127 3127
 
@@ -3471,17 +3471,17 @@  discard block
 block discarded – undo
3471 3471
     public function findEndOfStatement($start, $ignore=null)
3472 3472
     {
3473 3473
         $endTokens = array(
3474
-                      T_COLON                => true,
3475
-                      T_COMMA                => true,
3476
-                      T_DOUBLE_ARROW         => true,
3477
-                      T_SEMICOLON            => true,
3478
-                      T_CLOSE_PARENTHESIS    => true,
3479
-                      T_CLOSE_SQUARE_BRACKET => true,
3480
-                      T_CLOSE_CURLY_BRACKET  => true,
3481
-                      T_CLOSE_SHORT_ARRAY    => true,
3482
-                      T_OPEN_TAG             => true,
3483
-                      T_CLOSE_TAG            => true,
3484
-                     );
3474
+                        T_COLON                => true,
3475
+                        T_COMMA                => true,
3476
+                        T_DOUBLE_ARROW         => true,
3477
+                        T_SEMICOLON            => true,
3478
+                        T_CLOSE_PARENTHESIS    => true,
3479
+                        T_CLOSE_SQUARE_BRACKET => true,
3480
+                        T_CLOSE_CURLY_BRACKET  => true,
3481
+                        T_CLOSE_SHORT_ARRAY    => true,
3482
+                        T_OPEN_TAG             => true,
3483
+                        T_CLOSE_TAG            => true,
3484
+                        );
3485 3485
 
3486 3486
         if ($ignore !== null) {
3487 3487
             $ignore = (array) $ignore;
@@ -3694,9 +3694,9 @@  discard block
 block discarded – undo
3694 3694
         }
3695 3695
 
3696 3696
         $find = array(
3697
-                 T_NS_SEPARATOR,
3698
-                 T_STRING,
3699
-                 T_WHITESPACE,
3697
+                    T_NS_SEPARATOR,
3698
+                    T_STRING,
3699
+                    T_WHITESPACE,
3700 3700
                 );
3701 3701
 
3702 3702
         $end  = $this->findNext($find, ($extendsIndex + 1), $classCloserIndex, true);
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                                     $prevContent,
91 91
                                     $stackPtrType,
92 92
                                     $spaces,
93
-                                   );
93
+                                    );
94 94
 
95 95
                     $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data);
96 96
                     if ($fix === true) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 $data        = array(
106 106
                                 $prevContent,
107 107
                                 $stackPtrType,
108
-                               );
108
+                                );
109 109
 
110 110
                 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NewlineBeforeKeyword', $data);
111 111
                 if ($fix === true) {
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
             $found = strlen($gap);
138 138
             $error = 'Expected 1 space between %s keyword and %s name; %s found';
139 139
             $data  = array(
140
-                      $stackPtrType,
141
-                      $stackPtrType,
142
-                      $found,
143
-                     );
140
+                        $stackPtrType,
141
+                        $stackPtrType,
142
+                        $found,
143
+                        );
144 144
 
145 145
             $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data);
146 146
             if ($fix === true) {
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
                 $found = strlen($gap);
156 156
                 $error = 'Expected 1 space after %s name; %s found';
157 157
                 $data  = array(
158
-                          $stackPtrType,
159
-                          $found,
160
-                         );
158
+                            $stackPtrType,
159
+                            $found,
160
+                            );
161 161
 
162 162
                 $fix = $phpcsFile->addFixableError($error, $className, 'SpaceAfterName', $data);
163 163
                 if ($fix === true) {
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
         }
228 228
 
229 229
         $find = array(
230
-                 T_STRING,
231
-                 $keywordTokenType,
230
+                    T_STRING,
231
+                    $keywordTokenType,
232 232
                 );
233 233
 
234 234
         $classNames = array();
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
             ) {
256 256
                 $prev = $phpcsFile->findPrevious(
257 257
                     array(
258
-                     T_NS_SEPARATOR,
259
-                     T_WHITESPACE,
258
+                        T_NS_SEPARATOR,
259
+                        T_WHITESPACE,
260 260
                     ),
261 261
                     ($className - 1),
262 262
                     $implements,
@@ -319,9 +319,9 @@  discard block
 block discarded – undo
319 319
                     if ($found !== $expected) {
320 320
                         $error = 'Expected %s spaces before interface name; %s found';
321 321
                         $data  = array(
322
-                                  $expected,
323
-                                  $found,
324
-                                 );
322
+                                    $expected,
323
+                                    $found,
324
+                                    );
325 325
                         $fix   = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data);
326 326
                         if ($fix === true) {
327 327
                             $padding = str_repeat(' ', $expected);
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
                     if ($spaceBefore !== 1) {
359 359
                         $error = 'Expected 1 space before "%s"; %s found';
360 360
                         $data  = array(
361
-                                  $tokens[$className]['content'],
362
-                                  $spaceBefore,
363
-                                 );
361
+                                    $tokens[$className]['content'],
362
+                                    $spaceBefore,
363
+                                    );
364 364
 
365 365
                         $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeName', $data);
366 366
                         if ($fix === true) {
@@ -380,9 +380,9 @@  discard block
 block discarded – undo
380 380
                     if ($tokens[($className + 2)]['code'] !== $keywordTokenType) {
381 381
                         $error = 'Expected 0 spaces between "%s" and comma; %s found';
382 382
                         $data  = array(
383
-                                  $tokens[$className]['content'],
384
-                                  strlen($tokens[($className + 1)]['content']),
385
-                                 );
383
+                                    $tokens[$className]['content'],
384
+                                    strlen($tokens[($className + 1)]['content']),
385
+                                    );
386 386
 
387 387
                         $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeComma', $data);
388 388
                         if ($fix === true) {
Please login to merge, or discard this patch.