Completed
Branch master (d87ed9)
by Tomáš
07:16
created
CodeSniffer/Reporting.php 2 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -220,8 +220,8 @@
 block discarded – undo
220 220
         $report,
221 221
         $showSources,
222 222
         array $cliValues,
223
-        $reportFile='',
224
-        $reportWidth=80
223
+        $reportFile = '',
224
+        $reportWidth = 80
225 225
     ) {
226 226
         $reportClass = $this->factory($report);
227 227
         $report      = get_class($reportClass);
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -322,7 +322,7 @@
 block discarded – undo
322 322
                                   $expected,
323 323
                                   $found,
324 324
                                  );
325
-                        $fix   = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data);
325
+                        $fix = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data);
326 326
                         if ($fix === true) {
327 327
                             $padding = str_repeat(' ', $expected);
328 328
                             if ($found === 0) {
Please login to merge, or discard this patch.
Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         return array(
40 40
                 T_ELSE,
41 41
                 T_ELSEIF,
42
-               );
42
+                );
43 43
 
44 44
     }//end register()
45 45
 
Please login to merge, or discard this patch.
Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 T_ELSEIF,
63 63
                 T_TRY,
64 64
                 T_CATCH,
65
-               );
65
+                );
66 66
 
67 67
     }//end register()
68 68
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
         if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
105 105
             $error = 'Expected %s spaces after opening bracket; %s found';
106 106
             $data  = array(
107
-                      $this->requiredSpacesAfterOpen,
108
-                      $spaceAfterOpen,
109
-                     );
107
+                        $this->requiredSpacesAfterOpen,
108
+                        $spaceAfterOpen,
109
+                        );
110 110
             $fix   = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
111 111
             if ($fix === true) {
112 112
                 $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
             if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) {
132 132
                 $error = 'Expected %s spaces before closing bracket; %s found';
133 133
                 $data  = array(
134
-                          $this->requiredSpacesBeforeClose,
135
-                          $spaceBeforeClose,
136
-                         );
134
+                            $this->requiredSpacesBeforeClose,
135
+                            $spaceBeforeClose,
136
+                            );
137 137
                 $fix   = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
138 138
                 if ($fix === true) {
139 139
                     $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                       $this->requiredSpacesAfterOpen,
108 108
                       $spaceAfterOpen,
109 109
                      );
110
-            $fix   = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
110
+            $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
111 111
             if ($fix === true) {
112 112
                 $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
113 113
                 if ($spaceAfterOpen === 0) {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                           $this->requiredSpacesBeforeClose,
135 135
                           $spaceBeforeClose,
136 136
                          );
137
-                $fix   = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
137
+                $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
138 138
                 if ($fix === true) {
139 139
                     $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
140 140
                     if ($spaceBeforeClose === 0) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -80,18 +80,18 @@
 block discarded – undo
80 80
         $prefix = $stackPtr;
81 81
         while (($prefix = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$methodPrefixes, ($prefix - 1), $prev)) !== false) {
82 82
             switch ($tokens[$prefix]['code']) {
83
-            case T_STATIC:
84
-                $static = $prefix;
85
-                break;
86
-            case T_ABSTRACT:
87
-                $abstract = $prefix;
88
-                break;
89
-            case T_FINAL:
90
-                $final = $prefix;
91
-                break;
92
-            default:
93
-                $visibility = $prefix;
94
-                break;
83
+                case T_STATIC:
84
+                    $static = $prefix;
85
+                    break;
86
+                case T_ABSTRACT:
87
+                    $abstract = $prefix;
88
+                    break;
89
+                case T_FINAL:
90
+                    $final = $prefix;
91
+                    break;
92
+                default:
93
+                    $visibility = $prefix;
94
+                    break;
95 95
             }
96 96
         }
97 97
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
 
16 16
     public $foo, $bar, $var = null;
17 17
     public $foo,
18
-           $bar,
19
-           $var = null;
18
+            $bar,
19
+            $var = null;
20 20
 }
21 21
 
22 22
 class foo
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
                 130 => 2,
66 66
                 131 => 1,
67 67
                 158 => 1,
68
-               );
68
+                );
69 69
 
70 70
     }//end getErrorList()
71 71
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                 10 => 1,
47 47
                 16 => 1,
48 48
                 17 => 1,
49
-               );
49
+                );
50 50
 
51 51
     }//end getErrorList()
52 52
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 12 => 1,
66 66
                 13 => 1,
67 67
                 14 => 1,
68
-               );
68
+                );
69 69
 
70 70
     }//end getWarningList()
71 71
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 }
18 18
 
19 19
 class ClassName extends  ParentClass  implements
20
-   \ArrayAccess,
20
+    \ArrayAccess,
21 21
         \Foo\Bar\Countable,
22 22
     \Serializable {
23 23
     // constants, properties, methods
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 }
114 114
 
115 115
 interface MyInterface extends
116
- LongInterfaceName1,
116
+    LongInterfaceName1,
117 117
     LongInterfaceName2,
118
-     LongInterfaceName3,
118
+        LongInterfaceName3,
119 119
 LongInterfaceName4
120 120
 {
121 121
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class ClassName extends ParentClass implements \ArrayAccess,  \Countable
2
+class ClassName extends ParentClass implements \ArrayAccess, \Countable
3 3
 {
4 4
     // constants, properties, methods
5 5
 }
6 6
 
7
-class ClassName extends ParentClass,AnotherParentClass implements \ArrayAccess,\Countable {
7
+class ClassName extends ParentClass, AnotherParentClass implements \ArrayAccess, \Countable {
8 8
     // constants, properties, methods
9 9
 }
10 10
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 }
61 61
 
62 62
 class ClassName extends ParentClass implements
63
-    \Foo\Bar\Countable ,
63
+    \Foo\Bar\Countable,
64 64
     \Serializable
65 65
 {
66 66
     // constants, properties, methods
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
 class ClassName implements
129 129
 
130
-    \ArrayAccess,\Countable,
130
+    \ArrayAccess, \Countable,
131 131
 \Serializable
132 132
 {
133 133
     // constants, properties, methods
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,9 @@
 block discarded – undo
69 69
 class Test
70 70
 {
71 71
     public function test() {
72
-        if (1) 1;
72
+        if (1) {
73
+            1;
74
+        }
73 75
         1 ? (1 ? 1 : 1) : 1;
74 76
     }
75 77
 }
Please login to merge, or discard this patch.