Completed
Branch master (d87ed9)
by Tomáš
07:16
created
Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 }//end class
73 73
 
74 74
 // Closures don't need end comments.
75
-echo preg_replace_callback('~-([a-z])~', function ($match) { return strtoupper($match[1]); }, 'hello-world');
75
+echo preg_replace_callback('~-([a-z])~', function($match) { return strtoupper($match[1]); }, 'hello-world');
76 76
 
77 77
 class TestClass
78 78
 {
Please login to merge, or discard this patch.
Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                 106 => 1,
56 56
                 123 => 1,
57 57
                 215 => 1,
58
-               );
58
+                );
59 59
 
60 60
     }//end getErrorList()
61 61
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
                 50 => 1,
50 50
                 51 => 1,
51 51
                 52 => 1,
52
-               );
52
+                );
53 53
 
54 54
     }//end getErrorList()
55 55
 
Please login to merge, or discard this patch.
Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 63 => 1,
52 52
                 67 => 1,
53 53
                 79 => 1,
54
-               );
54
+                );
55 55
 
56 56
     }//end getErrorList()
57 57
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         return array(
70 70
                 71 => 1,
71
-               );
71
+                );
72 72
 
73 73
     }//end getWarningList()
74 74
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
                     27 => 2,
66 66
                     28 => 2,
67 67
                     32 => 2,
68
-                   );
68
+                    );
69 69
         default:
70 70
             return array();
71 71
         }
Please login to merge, or discard this patch.
Switch Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -53,21 +53,21 @@
 block discarded – undo
53 53
     public function getErrorList($testFile='FileCommentUnitTest.inc')
54 54
     {
55 55
         switch ($testFile) {
56
-        case 'FileCommentUnitTest.inc':
57
-        case 'FileCommentUnitTest.js':
58
-            return array(
59
-                    1  => 1,
60
-                    22 => 2,
61
-                    23 => 1,
62
-                    24 => 2,
63
-                    25 => 2,
64
-                    26 => 1,
65
-                    27 => 2,
66
-                    28 => 2,
67
-                    32 => 2,
68
-                   );
69
-        default:
70
-            return array();
56
+            case 'FileCommentUnitTest.inc':
57
+            case 'FileCommentUnitTest.js':
58
+                return array(
59
+                        1  => 1,
60
+                        22 => 2,
61
+                        23 => 1,
62
+                        24 => 2,
63
+                        25 => 2,
64
+                        26 => 1,
65
+                        27 => 2,
66
+                        28 => 2,
67
+                        32 => 2,
68
+                       );
69
+            default:
70
+                return array();
71 71
         }
72 72
 
73 73
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      *
51 51
      * @return array<int, int>
52 52
      */
53
-    public function getErrorList($testFile='FileCommentUnitTest.inc')
53
+    public function getErrorList($testFile = 'FileCommentUnitTest.inc')
54 54
     {
55 55
         switch ($testFile) {
56 56
         case 'FileCommentUnitTest.inc':
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -40,78 +40,78 @@
 block discarded – undo
40 40
     public function getErrorList()
41 41
     {
42 42
         $errors = array(
43
-                   5   => 1,
44
-                   10  => 3,
45
-                   12  => 2,
46
-                   13  => 2,
47
-                   14  => 1,
48
-                   15  => 1,
49
-                   28  => 1,
50
-                   43  => 1,
51
-                   76  => 1,
52
-                   87  => 1,
53
-                   103 => 1,
54
-                   109 => 1,
55
-                   112 => 1,
56
-                   122 => 1,
57
-                   123 => 3,
58
-                   124 => 2,
59
-                   125 => 1,
60
-                   126 => 1,
61
-                   137 => 4,
62
-                   138 => 4,
63
-                   139 => 4,
64
-                   143 => 2,
65
-                   152 => 1,
66
-                   155 => 2,
67
-                   159 => 1,
68
-                   166 => 1,
69
-                   173 => 1,
70
-                   183 => 1,
71
-                   190 => 2,
72
-                   193 => 2,
73
-                   196 => 1,
74
-                   199 => 2,
75
-                   210 => 1,
76
-                   211 => 1,
77
-                   222 => 1,
78
-                   223 => 1,
79
-                   224 => 1,
80
-                   225 => 1,
81
-                   226 => 1,
82
-                   227 => 1,
83
-                   230 => 2,
84
-                   232 => 1,
85
-                   246 => 1,
86
-                   248 => 4,
87
-                   261 => 1,
88
-                   263 => 1,
89
-                   276 => 1,
90
-                   277 => 1,
91
-                   278 => 1,
92
-                   279 => 1,
93
-                   280 => 1,
94
-                   281 => 1,
95
-                   284 => 1,
96
-                   286 => 2,
97
-                   294 => 1,
98
-                   302 => 1,
99
-                   312 => 1,
100
-                   358 => 1,
101
-                   359 => 2,
102
-                   372 => 1,
103
-                   373 => 1,
104
-                   387 => 1,
105
-                   407 => 1,
106
-                   441 => 1,
107
-                   500 => 1,
108
-                   526 => 1,
109
-                   548 => 1,
110
-                   641 => 1,
111
-                   669 => 1,
112
-                   744 => 1,
113
-                   748 => 1,
114
-                  );
43
+                    5   => 1,
44
+                    10  => 3,
45
+                    12  => 2,
46
+                    13  => 2,
47
+                    14  => 1,
48
+                    15  => 1,
49
+                    28  => 1,
50
+                    43  => 1,
51
+                    76  => 1,
52
+                    87  => 1,
53
+                    103 => 1,
54
+                    109 => 1,
55
+                    112 => 1,
56
+                    122 => 1,
57
+                    123 => 3,
58
+                    124 => 2,
59
+                    125 => 1,
60
+                    126 => 1,
61
+                    137 => 4,
62
+                    138 => 4,
63
+                    139 => 4,
64
+                    143 => 2,
65
+                    152 => 1,
66
+                    155 => 2,
67
+                    159 => 1,
68
+                    166 => 1,
69
+                    173 => 1,
70
+                    183 => 1,
71
+                    190 => 2,
72
+                    193 => 2,
73
+                    196 => 1,
74
+                    199 => 2,
75
+                    210 => 1,
76
+                    211 => 1,
77
+                    222 => 1,
78
+                    223 => 1,
79
+                    224 => 1,
80
+                    225 => 1,
81
+                    226 => 1,
82
+                    227 => 1,
83
+                    230 => 2,
84
+                    232 => 1,
85
+                    246 => 1,
86
+                    248 => 4,
87
+                    261 => 1,
88
+                    263 => 1,
89
+                    276 => 1,
90
+                    277 => 1,
91
+                    278 => 1,
92
+                    279 => 1,
93
+                    280 => 1,
94
+                    281 => 1,
95
+                    284 => 1,
96
+                    286 => 2,
97
+                    294 => 1,
98
+                    302 => 1,
99
+                    312 => 1,
100
+                    358 => 1,
101
+                    359 => 2,
102
+                    372 => 1,
103
+                    373 => 1,
104
+                    387 => 1,
105
+                    407 => 1,
106
+                    441 => 1,
107
+                    500 => 1,
108
+                    526 => 1,
109
+                    548 => 1,
110
+                    641 => 1,
111
+                    669 => 1,
112
+                    744 => 1,
113
+                    748 => 1,
114
+                    );
115 115
 
116 116
         // The yield tests will only work in PHP versions where yield exists and
117 117
         // will throw errors in earlier versions.
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -458,11 +458,11 @@  discard block
 block discarded – undo
458 458
  */
459 459
 function test($test)
460 460
 {
461
-   if ($test === TRUE) {
462
-       return;
463
-   }
461
+    if ($test === TRUE) {
462
+        return;
463
+    }
464 464
 
465
-   return $test;
465
+    return $test;
466 466
 
467 467
 }//end test()
468 468
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
  */
487 487
 function test(\other\ns\item $test)
488 488
 {
489
-   return $test;
489
+    return $test;
490 490
 
491 491
 }//end test()
492 492
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
  */
500 500
 function test(\other\ns\item $test)
501 501
 {
502
-   return $test;
502
+    return $test;
503 503
 
504 504
 }//end test()
505 505
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
  */
513 513
 function test(\first\ns\item $test = \second\ns::CONSTANT)
514 514
 {
515
-   return $test;
515
+    return $test;
516 516
 
517 517
 }//end test()
518 518
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
  */
526 526
 function test(\first\ns\item $test = \second\ns::CONSTANT)
527 527
 {
528
-   return $test;
528
+    return $test;
529 529
 
530 530
 }//end test()
531 531
 
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
  */
560 560
 function test($test)
561 561
 {
562
-   return $test;
562
+    return $test;
563 563
 
564 564
 }//end test()
565 565
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      * @return
15 15
      * @throws
16 16
      */
17
-    private function _functionCall($stackPtr, $depth=1, $index)
17
+    private function _functionCall($stackPtr, $depth = 1, $index)
18 18
     {
19 19
         return $stackPtr;
20 20
 
@@ -532,13 +532,13 @@  discard block
 block discarded – undo
532 532
 // Closures should be ignored.
533 533
 preg_replace_callback(
534 534
     '~-([a-z])~',
535
-    function ($match) {
535
+    function($match) {
536 536
         return strtoupper($match[1]);
537 537
     },
538 538
     'hello-world'
539 539
 );
540 540
 
541
-$callback = function ($bar) use ($foo)
541
+$callback = function($bar) use ($foo)
542 542
             {
543 543
                 $bar += $foo;
544 544
             };
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
  */
586 586
 public function containsClosure()
587 587
 {
588
-    function ($e) {
588
+    function($e) {
589 589
         return new Event($e);
590 590
     },
591 591
 
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
  *
727 727
  * @return void
728 728
  */
729
-public function myFunction (string $name1, int $name2, float $name3, bool $name4) {
729
+public function myFunction(string $name1, int $name2, float $name3, bool $name4) {
730 730
 }
731 731
 
732 732
 /**
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -47,21 +47,21 @@  discard block
 block discarded – undo
47 47
         switch ($testFile) {
48 48
         case 'InlineCommentUnitTest.inc':
49 49
             $errors = array(
50
-                       17  => 1,
51
-                       27  => 1,
52
-                       28  => 1,
53
-                       32  => 2,
54
-                       36  => 1,
55
-                       44  => 2,
56
-                       58  => 1,
57
-                       61  => 1,
58
-                       64  => 1,
59
-                       67  => 1,
60
-                       95  => 1,
61
-                       96  => 1,
62
-                       97  => 3,
63
-                       118 => 1,
64
-                      );
50
+                        17  => 1,
51
+                        27  => 1,
52
+                        28  => 1,
53
+                        32  => 2,
54
+                        36  => 1,
55
+                        44  => 2,
56
+                        58  => 1,
57
+                        61  => 1,
58
+                        64  => 1,
59
+                        67  => 1,
60
+                        95  => 1,
61
+                        96  => 1,
62
+                        97  => 3,
63
+                        118 => 1,
64
+                        );
65 65
 
66 66
             return $errors;
67 67
         case 'InlineCommentUnitTest.js':
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                     103 => 1,
77 77
                     104 => 3,
78 78
                     118 => 1,
79
-                   );
79
+                    );
80 80
         default:
81 81
             return array();
82 82
         }//end switch
Please login to merge, or discard this patch.
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -45,40 +45,40 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='InlineCommentUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'InlineCommentUnitTest.inc':
49
-            $errors = array(
50
-                       17  => 1,
51
-                       27  => 1,
52
-                       28  => 1,
53
-                       32  => 2,
54
-                       36  => 1,
55
-                       44  => 2,
56
-                       58  => 1,
57
-                       61  => 1,
58
-                       64  => 1,
59
-                       67  => 1,
60
-                       95  => 1,
61
-                       96  => 1,
62
-                       97  => 3,
63
-                       118 => 1,
64
-                      );
48
+            case 'InlineCommentUnitTest.inc':
49
+                $errors = array(
50
+                           17  => 1,
51
+                           27  => 1,
52
+                           28  => 1,
53
+                           32  => 2,
54
+                           36  => 1,
55
+                           44  => 2,
56
+                           58  => 1,
57
+                           61  => 1,
58
+                           64  => 1,
59
+                           67  => 1,
60
+                           95  => 1,
61
+                           96  => 1,
62
+                           97  => 3,
63
+                           118 => 1,
64
+                          );
65 65
 
66
-            return $errors;
67
-        case 'InlineCommentUnitTest.js':
68
-            return array(
69
-                    31  => 1,
70
-                    36  => 2,
71
-                    48  => 1,
72
-                    51  => 1,
73
-                    54  => 1,
74
-                    57  => 1,
75
-                    102 => 1,
76
-                    103 => 1,
77
-                    104 => 3,
78
-                    118 => 1,
79
-                   );
80
-        default:
81
-            return array();
66
+                return $errors;
67
+            case 'InlineCommentUnitTest.js':
68
+                return array(
69
+                        31  => 1,
70
+                        36  => 2,
71
+                        48  => 1,
72
+                        51  => 1,
73
+                        54  => 1,
74
+                        57  => 1,
75
+                        102 => 1,
76
+                        103 => 1,
77
+                        104 => 3,
78
+                        118 => 1,
79
+                       );
80
+            default:
81
+                return array();
82 82
         }//end switch
83 83
 
84 84
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<int, int>
44 44
      */
45
-    public function getErrorList($testFile='InlineCommentUnitTest.inc')
45
+    public function getErrorList($testFile = 'InlineCommentUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'InlineCommentUnitTest.inc':
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@
 block discarded – undo
84 84
     /**
85 85
        test
86 86
        here
87
-    **/
87
+     **/
88 88
     echo 'test';
89 89
     /**
90 90
         Test
91 91
         here
92
-       **/
92
+     **/
93 93
 
94 94
 }//end func()
95 95
 
Please login to merge, or discard this patch.
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -144,26 +144,26 @@
 block discarded – undo
144 144
 }
145 145
 
146 146
 switch ($var) {
147
-    case 'foo':
148
-        /*
147
+        case 'foo':
148
+            /*
149 149
             Foo comment.
150 150
             This is a multiple
151 151
             line comment for Foo.
152 152
         */
153 153
 
154
-        echo 'Foo';
155
-    break;
154
+            echo 'Foo';
155
+        break;
156 156
 
157
-    default:
157
+        default:
158 158
 
159
-        /*
159
+            /*
160 160
             Foo comment.
161 161
             This is a multiple
162 162
             line comment for Foo.
163 163
         */
164 164
 
165
-        echo 'Default';
166
-    break;
165
+            echo 'Default';
166
+        break;
167 167
 }//end switch
168 168
 
169 169
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 /*
187 187
     Comment goes here
188 188
 */
189
-$two = (1 + 1);  // I'm not a comment closer!
189
+$two = (1 + 1); // I'm not a comment closer!
190 190
 
191 191
 class Foo
192 192
 {
Please login to merge, or discard this patch.