Completed
Pull Request — master (#6)
by Tomáš
07:30
created
src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc 3 patches
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -57,16 +57,16 @@
 block discarded – undo
57 57
 }
58 58
 
59 59
 switch ($blah) {
60
-    case 'one':
61
-        if ($blah) {
62
-            // There are no spaces before break.
63
-        }
64
-    break;
65
-
66
-    default:
67
-        if ($blah) {
68
-            // Code here.
69
-        }
60
+        case 'one':
61
+            if ($blah) {
62
+                // There are no spaces before break.
63
+            }
64
+        break;
65
+
66
+        default:
67
+            if ($blah) {
68
+                // Code here.
69
+            }
70 70
 }
71 71
 
72 72
 foreach ($blah as $var) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
     $settingsUpdated = FALSE;
111 111
 }
112 112
 
113
-foreach ( $blah as $var ) {
114
-    if (  $blah    ) {
113
+foreach ($blah as $var) {
114
+    if ($blah) {
115 115
     }
116 116
 }
117 117
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
 do {
175 175
     echo 'hi';
176
-} while (  $blah  );
176
+} while ($blah);
177 177
 
178 178
 if ($one) {
179 179
 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@  discard block
 block discarded – undo
17 17
 }
18 18
 
19 19
 if ($one) {
20
-} else ($two) {
20
+} else {
21
+    ($two) {
21 22
 } else if ($three) {
22 23
 } elseif ($four) {
23 24
 }
@@ -48,6 +49,7 @@  discard block
 block discarded – undo
48 49
             // There are no spaces before break.
49 50
         }
50 51
     break;
52
+}
51 53
 
52 54
     default:
53 55
         if ($blah) {
@@ -158,8 +160,7 @@  discard block
 block discarded – undo
158 160
 }
159 161
 
160 162
 if ($one) {
161
-}
162
-elseif ($two) {
163
+} elseif ($two) {
163 164
 }
164 165
 // else if something
165 166
 else if ($three) {
@@ -193,8 +194,7 @@  discard block
 block discarded – undo
193 194
 
194 195
 try {
195 196
     // Something
196
-}
197
-catch (Exception $e) {
197
+} catch (Exception $e) {
198 198
     // Something
199 199
 }
200 200
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,20 +79,20 @@
 block discarded – undo
79 79
                     46 => 1,
80 80
                     47 => 1,
81 81
                     48 => 1,
82
-                   );
82
+                    );
83 83
             break;
84 84
         case 'DisallowTabIndentUnitTest.js':
85 85
             return array(
86 86
                     3 => 1,
87 87
                     5 => 1,
88 88
                     6 => 1,
89
-                   );
89
+                    );
90 90
             break;
91 91
         case 'DisallowTabIndentUnitTest.css':
92 92
             return array(
93 93
                     1 => 1,
94 94
                     2 => 1,
95
-                   );
95
+                    );
96 96
             break;
97 97
         default:
98 98
             return array();
Please login to merge, or discard this patch.
Switch Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -45,46 +45,46 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='SuperfluousWhitespaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'SuperfluousWhitespaceUnitTest.inc':
49
-            return array(
50
-                    2  => 1,
51
-                    4  => 1,
52
-                    5  => 1,
53
-                    6  => 1,
54
-                    7  => 1,
55
-                    16 => 1,
56
-                    23 => 1,
57
-                    28 => 1,
58
-                    33 => 1,
59
-                    53 => 1,
60
-                   );
61
-            break;
62
-        case 'SuperfluousWhitespaceUnitTest.1.js':
63
-            return array(
64
-                    1  => 1,
65
-                    3  => 1,
66
-                    4  => 1,
67
-                    5  => 1,
68
-                    6  => 1,
69
-                    15 => 1,
70
-                    22 => 1,
71
-                    29 => 1,
72
-                    38 => 1,
73
-                    56 => 1,
74
-                   );
75
-            break;
76
-        case 'SuperfluousWhitespaceUnitTest.1.css':
77
-            return array(
78
-                    1  => 1,
79
-                    8  => 1,
80
-                    9  => 1,
81
-                    11 => 1,
82
-                    25 => 1,
83
-                   );
84
-            break;
85
-        default:
86
-            return array();
87
-            break;
48
+            case 'SuperfluousWhitespaceUnitTest.inc':
49
+                return array(
50
+                        2  => 1,
51
+                        4  => 1,
52
+                        5  => 1,
53
+                        6  => 1,
54
+                        7  => 1,
55
+                        16 => 1,
56
+                        23 => 1,
57
+                        28 => 1,
58
+                        33 => 1,
59
+                        53 => 1,
60
+                       );
61
+                break;
62
+            case 'SuperfluousWhitespaceUnitTest.1.js':
63
+                return array(
64
+                        1  => 1,
65
+                        3  => 1,
66
+                        4  => 1,
67
+                        5  => 1,
68
+                        6  => 1,
69
+                        15 => 1,
70
+                        22 => 1,
71
+                        29 => 1,
72
+                        38 => 1,
73
+                        56 => 1,
74
+                       );
75
+                break;
76
+            case 'SuperfluousWhitespaceUnitTest.1.css':
77
+                return array(
78
+                        1  => 1,
79
+                        8  => 1,
80
+                        9  => 1,
81
+                        11 => 1,
82
+                        25 => 1,
83
+                       );
84
+                break;
85
+            default:
86
+                return array();
87
+                break;
88 88
         }//end switch
89 89
 
90 90
     }//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='SuperfluousWhitespaceUnitTest.inc')
45
+    public function getErrorList($testFile = 'SuperfluousWhitespaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'SuperfluousWhitespaceUnitTest.inc':
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
             return array(
48 48
                     4 => 1,
49 49
                     5 => 1,
50
-                   );
50
+                    );
51 51
         } else if (version_compare(PHP_VERSION, '5.4.0RC1') >= 0) {
52 52
             // Shorthand echo is always available from PHP 5.4.0 but needed the
53 53
             // short_open_tag ini var to be set for versions before this.
54 54
             return array(
55 55
                     4 => 1,
56
-                   );
56
+                    );
57 57
         }
58 58
 
59 59
         return array();
Please login to merge, or discard this patch.
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -45,29 +45,29 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='SemicolonSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'SemicolonSpacingUnitTest.inc':
49
-            return array(
50
-                    3 => 1,
51
-                    4 => 1,
52
-                    5 => 2,
53
-                    6 => 1,
54
-                    8 => 1,
55
-                    9 => 1,
56
-                   );
57
-            break;
58
-        case 'SemicolonSpacingUnitTest.js':
59
-            return array(
60
-                    3  => 1,
61
-                    4  => 1,
62
-                    6  => 1,
63
-                    10 => 2,
64
-                    11 => 1,
65
-                    13 => 1,
66
-                   );
67
-            break;
68
-        default:
69
-            return array();
70
-            break;
48
+            case 'SemicolonSpacingUnitTest.inc':
49
+                return array(
50
+                        3 => 1,
51
+                        4 => 1,
52
+                        5 => 2,
53
+                        6 => 1,
54
+                        8 => 1,
55
+                        9 => 1,
56
+                       );
57
+                break;
58
+            case 'SemicolonSpacingUnitTest.js':
59
+                return array(
60
+                        3  => 1,
61
+                        4  => 1,
62
+                        6  => 1,
63
+                        10 => 2,
64
+                        11 => 1,
65
+                        13 => 1,
66
+                       );
67
+                break;
68
+            default:
69
+                return array();
70
+                break;
71 71
         }//end switch
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
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<int, int>
44 44
      */
45
-    public function getErrorList($testFile='SemicolonSpacingUnitTest.inc')
45
+    public function getErrorList($testFile = 'SemicolonSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'SemicolonSpacingUnitTest.inc':
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -43,35 +43,35 @@
 block discarded – undo
43 43
     public function getErrorList()
44 44
     {
45 45
         $errors = array(
46
-                   8   => 1,
47
-                   20  => 1,
48
-                   24  => 1,
49
-                   30  => 1,
50
-                   31  => 1,
51
-                   34  => 1,
52
-                   40  => 1,
53
-                   45  => 1,
54
-                   49  => 1,
55
-                   51  => 1,
56
-                   53  => 1,
57
-                   57  => 1,
58
-                   60  => 1,
59
-                   61  => 1,
60
-                   63  => 1,
61
-                   65  => 1,
62
-                   68  => 1,
63
-                   70  => 1,
64
-                   72  => 1,
65
-                   75  => 1,
66
-                   84  => 1,
67
-                   87  => 1,
68
-                   89  => 1,
69
-                   92  => 1,
70
-                   111 => 1,
71
-                   159 => 1,
72
-                   181 => 1,
73
-                   188 => 1,
74
-                  );
46
+                    8   => 1,
47
+                    20  => 1,
48
+                    24  => 1,
49
+                    30  => 1,
50
+                    31  => 1,
51
+                    34  => 1,
52
+                    40  => 1,
53
+                    45  => 1,
54
+                    49  => 1,
55
+                    51  => 1,
56
+                    53  => 1,
57
+                    57  => 1,
58
+                    60  => 1,
59
+                    61  => 1,
60
+                    63  => 1,
61
+                    65  => 1,
62
+                    68  => 1,
63
+                    70  => 1,
64
+                    72  => 1,
65
+                    75  => 1,
66
+                    84  => 1,
67
+                    87  => 1,
68
+                    89  => 1,
69
+                    92  => 1,
70
+                    111 => 1,
71
+                    159 => 1,
72
+                    181 => 1,
73
+                    188 => 1,
74
+                    );
75 75
 
76 76
         return $errors;
77 77
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      * @return array
240 240
      * @throws ChannelException If the project is invalid.
241 241
      */
242
-    public static function getTestInfo($projectid=NULL)
242
+    public static function getTestInfo($projectid = NULL)
243 243
     {
244 244
         try {
245 245
             DAL::beginTransaction();
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     {
265 265
         parent::setUp();
266 266
 
267
-        if ( !strlen($this->folderName) ) {
267
+        if (!strlen($this->folderName)) {
268 268
             throw new \RuntimeException('The $this->folderName must be specified before proceeding.');
269 269
         }
270 270
     }
Please login to merge, or discard this patch.
src/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.
src/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.