Completed
Push — master ( 8cd077 )
by Tomáš
09:25
created
src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.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/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.
Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc 3 patches
Switch Indentation   +158 added lines, -158 removed lines patch added patch discarded remove patch
@@ -493,41 +493,41 @@  discard block
 block discarded – undo
493 493
 }
494 494
 
495 495
 switch ($something) {
496
-    case '1':
497
-    // Line 1
498
-    // Line 2
499
-    // Line 3
500
-    // Line 4
501
-    // Line 5
502
-    break;
503
-    case '2':
504
-    // Line 1
505
-    // Line 2
506
-    // Line 3
507
-    // Line 4
508
-    // Line 5
509
-    break;
510
-    case '3':
511
-    // Line 1
512
-    // Line 2
513
-    // Line 3
514
-    // Line 4
515
-    // Line 5
516
-    break;
517
-    case '4':
518
-    // Line 1
519
-    // Line 2
520
-    // Line 3
521
-    // Line 4
522
-    // Line 5
523
-    break;
524
-    case '5':
525
-    // Line 1
526
-    // Line 2
527
-    // Line 3
528
-    // Line 4
529
-    // Line 5
530
-    break;
496
+        case '1':
497
+        // Line 1
498
+        // Line 2
499
+        // Line 3
500
+        // Line 4
501
+        // Line 5
502
+        break;
503
+        case '2':
504
+        // Line 1
505
+        // Line 2
506
+        // Line 3
507
+        // Line 4
508
+        // Line 5
509
+        break;
510
+        case '3':
511
+        // Line 1
512
+        // Line 2
513
+        // Line 3
514
+        // Line 4
515
+        // Line 5
516
+        break;
517
+        case '4':
518
+        // Line 1
519
+        // Line 2
520
+        // Line 3
521
+        // Line 4
522
+        // Line 5
523
+        break;
524
+        case '5':
525
+        // Line 1
526
+        // Line 2
527
+        // Line 3
528
+        // Line 4
529
+        // Line 5
530
+        break;
531 531
 }
532 532
 
533 533
 // Wrong comment
@@ -629,69 +629,69 @@  discard block
 block discarded – undo
629 629
 }
630 630
 
631 631
 switch ($foo) {
632
-    case 'one' : {
633
-        // some code here.
634
-        // some code here.
635
-        // some code here.
636
-        // some code here.
637
-        // some code here.
638
-        // some code here.
639
-        // some code here.
640
-        // some code here.
641
-        // some code here.
642
-        // some code here.
643
-        // some code here.
644
-        // some code here.
645
-        // some code here.
646
-        // some code here.
647
-        // some code here.
648
-        // some code here.
649
-        // some code here.
650
-        // some code here.
651
-        // some code here.
652
-        // some code here.
653
-        // some code here.
654
-        // some code here.
655
-        // some code here.
656
-        // some code here.
657
-        // some code here.
658
-        // some code here.
659
-        // some code here.
660
-        // some code here.
661
-        // some code here.
632
+        case 'one' : {
633
+            // some code here.
634
+            // some code here.
635
+            // some code here.
636
+            // some code here.
637
+            // some code here.
638
+            // some code here.
639
+            // some code here.
640
+            // some code here.
641
+            // some code here.
642
+            // some code here.
643
+            // some code here.
644
+            // some code here.
645
+            // some code here.
646
+            // some code here.
647
+            // some code here.
648
+            // some code here.
649
+            // some code here.
650
+            // some code here.
651
+            // some code here.
652
+            // some code here.
653
+            // some code here.
654
+            // some code here.
655
+            // some code here.
656
+            // some code here.
657
+            // some code here.
658
+            // some code here.
659
+            // some code here.
660
+            // some code here.
661
+            // some code here.
662
+            break;
663
+        }
664
+        case 'one' :
665
+            // some code here.
666
+            // some code here.
667
+            // some code here.
668
+            // some code here.
669
+            // some code here.
670
+            // some code here.
671
+            // some code here.
672
+            // some code here.
673
+            // some code here.
674
+            // some code here.
675
+            // some code here.
676
+            // some code here.
677
+            // some code here.
678
+            // some code here.
679
+            // some code here.
680
+            // some code here.
681
+            // some code here.
682
+            // some code here.
683
+            // some code here.
684
+            // some code here.
685
+            // some code here.
686
+            // some code here.
687
+            // some code here.
688
+            // some code here.
689
+            // some code here.
690
+            // some code here.
691
+            // some code here.
692
+            // some code here.
693
+            // some code here.
662 694
         break;
663
-    }
664
-    case 'one' :
665
-        // some code here.
666
-        // some code here.
667
-        // some code here.
668
-        // some code here.
669
-        // some code here.
670
-        // some code here.
671
-        // some code here.
672
-        // some code here.
673
-        // some code here.
674
-        // some code here.
675
-        // some code here.
676
-        // some code here.
677
-        // some code here.
678
-        // some code here.
679
-        // some code here.
680
-        // some code here.
681
-        // some code here.
682
-        // some code here.
683
-        // some code here.
684
-        // some code here.
685
-        // some code here.
686
-        // some code here.
687
-        // some code here.
688
-        // some code here.
689
-        // some code here.
690
-        // some code here.
691
-        // some code here.
692
-        // some code here.
693
-        // some code here.
694
-    break;
695 695
 }//end switch
696 696
 
697 697
 // Yes, code like this does exist.
@@ -701,65 +701,65 @@  discard block
 block discarded – undo
701 701
     return $bar;
702 702
 
703 703
 switch ($foo) {
704
-    case 1:
705
-    case 2:
706
-    case 3:
707
-    case 4:
708
-    case 5:
709
-    case 6:
710
-    case 7:
711
-    case 8:
712
-    case 9:
713
-    case 10:
714
-    case 11:
715
-    case 12:
716
-    case 13:
717
-    case 14:
718
-    case 15:
719
-    case 16:
720
-    case 17:
721
-    case 18:
722
-    case 19:
723
-    case 20:
724
-    case 21:
725
-    case 22:
726
-    case 23:
727
-    case 24:
728
-    case 25:
729
-    case 26:
730
-    case 27:
731
-    case 28:
732
-    case 29:
733
-    case 30:
734
-    case 31:
735
-    case 32:
736
-    case 33:
737
-    case 34:
738
-    case 35:
739
-    case 36:
740
-    case 37:
741
-    case 38:
742
-    case 39:
743
-    case 40:
744
-    case 41:
745
-    case 42:
746
-    case 43:
747
-    case 44:
748
-    case 45:
749
-    case 46:
750
-    case 47:
751
-    case 48:
752
-    case 49:
753
-    case 50:
754
-    case 51:
755
-    case 52:
756
-    case 53:
757
-    case 54:
758
-    case 55:
759
-    case 56:
760
-    case 57:
761
-    case 58:
762
-    case 59:
763
-        echo $foo;
764
-        break;
704
+        case 1:
705
+        case 2:
706
+        case 3:
707
+        case 4:
708
+        case 5:
709
+        case 6:
710
+        case 7:
711
+        case 8:
712
+        case 9:
713
+        case 10:
714
+        case 11:
715
+        case 12:
716
+        case 13:
717
+        case 14:
718
+        case 15:
719
+        case 16:
720
+        case 17:
721
+        case 18:
722
+        case 19:
723
+        case 20:
724
+        case 21:
725
+        case 22:
726
+        case 23:
727
+        case 24:
728
+        case 25:
729
+        case 26:
730
+        case 27:
731
+        case 28:
732
+        case 29:
733
+        case 30:
734
+        case 31:
735
+        case 32:
736
+        case 33:
737
+        case 34:
738
+        case 35:
739
+        case 36:
740
+        case 37:
741
+        case 38:
742
+        case 39:
743
+        case 40:
744
+        case 41:
745
+        case 42:
746
+        case 43:
747
+        case 44:
748
+        case 45:
749
+        case 46:
750
+        case 47:
751
+        case 48:
752
+        case 49:
753
+        case 50:
754
+        case 51:
755
+        case 52:
756
+        case 53:
757
+        case 54:
758
+        case 55:
759
+        case 56:
760
+        case 57:
761
+        case 58:
762
+        case 59:
763
+            echo $foo;
764
+            break;
765 765
 }
766 766
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     // Line 20
146 146
 }
147 147
 
148
-for ($var =1; $var < 20; $var++) {
148
+for ($var = 1; $var < 20; $var++) {
149 149
     // Line 1
150 150
     // Line 2
151 151
     // Line 3
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     // Line 20
169 169
 }//end for
170 170
 
171
-for ($var =1; $var < 20; $var++) {
171
+for ($var = 1; $var < 20; $var++) {
172 172
     // Line 1
173 173
     // Line 2
174 174
     // Line 3
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     // Line 7
179 179
     // Line 8
180 180
     // Line 9
181
-    for ($val =1; $val < 20; $val++) {
181
+    for ($val = 1; $val < 20; $val++) {
182 182
         // Short for.
183 183
     }
184 184
     // Line 13
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
     // Line 20
309 309
 } //end foreach
310 310
 
311
-for ($var =1; $var < 20; $var++) {
311
+for ($var = 1; $var < 20; $var++) {
312 312
     // Line 1
313 313
     // Line 2
314 314
     // Line 3
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -697,8 +697,9 @@
 block discarded – undo
697 697
 // Yes, code like this does exist.
698 698
 if ($foo) {
699 699
     return $foo;
700
-} elseif ($bar)
700
+} elseif ($bar) {
701 701
     return $bar;
702
+}
702 703
 
703 704
 switch ($foo) {
704 705
     case 1:
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.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/PostStatementCommentUnitTest.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   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -45,23 +45,23 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='PostStatementCommentUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'PostStatementCommentUnitTest.inc':
49
-            return array(
50
-                    6  => 1,
51
-                    10 => 1,
52
-                    18 => 1,
53
-                   );
54
-            break;
55
-        case 'PostStatementCommentUnitTest.js':
56
-            return array(
57
-                    1 => 1,
58
-                    4 => 1,
59
-                    9 => 1,
60
-                   );
61
-            break;
62
-        default:
63
-            return array();
64
-            break;
48
+            case 'PostStatementCommentUnitTest.inc':
49
+                return array(
50
+                        6  => 1,
51
+                        10 => 1,
52
+                        18 => 1,
53
+                       );
54
+                break;
55
+            case 'PostStatementCommentUnitTest.js':
56
+                return array(
57
+                        1 => 1,
58
+                        4 => 1,
59
+                        9 => 1,
60
+                       );
61
+                break;
62
+            default:
63
+                return array();
64
+                break;
65 65
         }//end switch
66 66
 
67 67
     }//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='PostStatementCommentUnitTest.inc')
45
+    public function getErrorList($testFile = 'PostStatementCommentUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'PostStatementCommentUnitTest.inc':
Please login to merge, or discard this patch.
Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 public function someFunctionWithAVeryLongName($firstParameter='something',
3
-   $secondParameter='booooo',
4
-   $third=null, $fourthParameter=false,
5
-     $fifthParameter=123.12,
3
+    $secondParameter='booooo',
4
+    $third=null, $fourthParameter=false,
5
+        $fifthParameter=123.12,
6 6
     $sixthParam=true
7 7
 ){
8 8
 }
@@ -39,22 +39,22 @@  discard block
 block discarded – undo
39 39
     ) {
40 40
     }
41 41
 
42
-     public function someFunctionWithAVeryLongName3(
43
-         $firstParameter, $secondParameter, $third=null
44
-     ) {
45
-     }
46
-
47
-     public function someFunctionWithAVeryLongName4(
48
-         $firstParameter, $secondParameter
49
-     ) {
50
-     }
51
-
52
-     public function someFunctionWithAVeryLongName5(
53
-         $firstParameter,
54
-         $secondParameter=array(1,2,3),
55
-         $third=null
56
-     ) {
57
-     }
42
+        public function someFunctionWithAVeryLongName3(
43
+            $firstParameter, $secondParameter, $third=null
44
+        ) {
45
+        }
46
+
47
+        public function someFunctionWithAVeryLongName4(
48
+            $firstParameter, $secondParameter
49
+        ) {
50
+        }
51
+
52
+        public function someFunctionWithAVeryLongName5(
53
+            $firstParameter,
54
+            $secondParameter=array(1,2,3),
55
+            $third=null
56
+        ) {
57
+        }
58 58
 
59 59
 }
60 60
 
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-public function someFunctionWithAVeryLongName($firstParameter='something',
3
-   $secondParameter='booooo',
4
-   $third=null, $fourthParameter=false,
5
-     $fifthParameter=123.12,
6
-    $sixthParam=true
7
-){
2
+public function someFunctionWithAVeryLongName($firstParameter = 'something',
3
+   $secondParameter = 'booooo',
4
+   $third = null, $fourthParameter = false,
5
+     $fifthParameter = 123.12,
6
+    $sixthParam = true
7
+) {
8 8
 }
9 9
 
10 10
 function someFunctionWithAVeryLongName2(
11
-$firstParameter='something',
12
-$secondParameter='booooo',
13
-)  {
11
+$firstParameter = 'something',
12
+$secondParameter = 'booooo',
13
+) {
14 14
 }
15 15
 
16 16
 function blah() {
@@ -24,23 +24,23 @@  discard block
 block discarded – undo
24 24
 {
25 25
 
26 26
     public function someFunctionWithAVeryLongName(
27
-        $firstParameter='something',
28
-        $secondParameter='booooo',
29
-        $third=null,
30
-        $fourthParameter=false,
31
-        $fifthParameter=123.12,
32
-        $sixthParam=true
27
+        $firstParameter = 'something',
28
+        $secondParameter = 'booooo',
29
+        $third = null,
30
+        $fourthParameter = false,
31
+        $fifthParameter = 123.12,
32
+        $sixthParam = true
33 33
     ) /** w00t */ {
34 34
     }
35 35
 
36
-    public function someFunctionWithAVeryLongName2($firstParameter='something',
37
-        $secondParameter='booooo',
38
-        $third=null
36
+    public function someFunctionWithAVeryLongName2($firstParameter = 'something',
37
+        $secondParameter = 'booooo',
38
+        $third = null
39 39
     ) {
40 40
     }
41 41
 
42 42
      public function someFunctionWithAVeryLongName3(
43
-         $firstParameter, $secondParameter, $third=null
43
+         $firstParameter, $secondParameter, $third = null
44 44
      ) {
45 45
      }
46 46
 
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
 
52 52
      public function someFunctionWithAVeryLongName5(
53 53
          $firstParameter,
54
-         $secondParameter=array(1,2,3),
55
-         $third=null
54
+         $secondParameter = array(1, 2, 3),
55
+         $third = null
56 56
      ) {
57 57
      }
58 58
 
59 59
 }
60 60
 
61
-$noArgs_longVars = function () use (
61
+$noArgs_longVars = function() use (
62 62
     $longVar1,
63 63
     $longerVar2,
64 64
     $muchLongerVar3
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     // body
67 67
 };
68 68
 
69
-$longArgs_longVars = function (
69
+$longArgs_longVars = function(
70 70
     $longArgument,
71 71
     $longerArgument,
72 72
     $muchLongerArgument
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
     // body
79 79
 };
80 80
 
81
-$longArgs_longVars = function ($longArgument,
81
+$longArgs_longVars = function($longArgument,
82 82
     $muchLongerArgument) use ($muchLongerVar3
83 83
 ) {
84 84
     // body
85 85
 };
86 86
 
87
-$noArgs_longVars = function () use (
88
-    $longVar1,  $longerVar2,
87
+$noArgs_longVars = function() use (
88
+    $longVar1, $longerVar2,
89 89
     $muchLongerVar3
90 90
 ) {
91 91
     // body
@@ -93,19 +93,19 @@  discard block
 block discarded – undo
93 93
 
94 94
 usort(
95 95
     $data,
96
-    function ($a, $b) {
96
+    function($a, $b) {
97 97
         // body
98 98
     }
99 99
 );
100 100
 
101 101
 function myFunction(
102
-    $firstParameter,$secondParameter=[1,2,3],$third=null
102
+    $firstParameter, $secondParameter = [1, 2, 3], $third = null
103 103
 ) {
104 104
 }
105 105
 
106 106
 if (array_filter(
107 107
     $commands,
108
-    function ($cmd) use ($commandName) {
108
+    function($cmd) use ($commandName) {
109 109
         return ($cmd['name'] == $commandName);
110 110
     }
111 111
 )) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     // body
128 128
 }
129 129
 
130
-$foo = function ($bar = [
130
+$foo = function($bar = [
131 131
     1,
132 132
     2,
133 133
 ]) use ($longVar1, $longerVar2) {
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.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.
Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,10 +58,10 @@
 block discarded – undo
58 58
 function myFunc( ) {}
59 59
 
60 60
 function multiLineFunction(
61
-	array $flatList,
62
-	$markup,
63
-	array $otherList,
64
-	$lastOffset=0
61
+    array $flatList,
62
+    $markup,
63
+    array $otherList,
64
+    $lastOffset=0
65 65
 ) {
66 66
 }
67 67
 // @codingStandardsChangeSetting Squiz.Functions.FunctionDeclarationArgumentSpacing requiredSpacesAfterOpen 0
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -2,38 +2,38 @@  discard block
 block discarded – undo
2 2
 function myFunc() {}
3 3
 function myFunc( ) {}
4 4
 function myFunc($blah) {}
5
-function myFunc( $blah ) {}
5
+function myFunc($blah) {}
6
+function myFunc($blah, $blah2, $blah3) {}
7
+function myFunc($blah, $blah2, $blah3) {}
6 8
 function myFunc($blah, $blah2, $blah3) {}
7
-function myFunc($blah , $blah2, $blah3 ) {}
8
-function myFunc($blah,$blah2,$blah3) {}
9
-function myFunc($blah,   $blah2,  $blah3) {}
10
-function myFunc($blah='hello') {}
9
+function myFunc($blah, $blah2, $blah3) {}
10
+function myFunc($blah = 'hello') {}
11 11
 function myFunc($blah = 'hello') {}
12
-function myFunc(PHP_CodeSniffer $object, array $array=array(), $blah3='yo') {}
13
-function myFunc(  $blah='hello'   , $blah2=   'hi',  $blah3   = 'yo' ) {}
14
-function myFunc(PHP_CodeSniffer   $object, array  $array=array(), $blah3='yo') {}
15
-function myFunc( PHP_CodeSniffer $object,  array $array=array(), $blah3='yo') {}
16
-function myFunc( array  &$one,  array  &$two) {}
12
+function myFunc(PHP_CodeSniffer $object, array $array = array(), $blah3 = 'yo') {}
13
+function myFunc($blah = 'hello', $blah2 = 'hi', $blah3 = 'yo') {}
14
+function myFunc(PHP_CodeSniffer   $object, array  $array = array(), $blah3 = 'yo') {}
15
+function myFunc(PHP_CodeSniffer $object, array $array = array(), $blah3 = 'yo') {}
16
+function myFunc(array  &$one, array  &$two) {}
17
+function myFunc(&$blah) {}
17 18
 function myFunc(&$blah) {}
18
-function myFunc( &$blah ) {}
19 19
 
20 20
 function multiLineFunction(
21 21
     array $flatList,
22 22
     $markup,
23 23
     array $otherList,
24
-    $lastOffset=0
24
+    $lastOffset = 0
25 25
 ) {
26 26
 }
27 27
 
28 28
 function multiLineFunction(
29 29
     $markup,
30 30
     array $otherList,
31
-    $lastOffset=0
31
+    $lastOffset = 0
32 32
 ) {
33 33
 }
34 34
 
35
-$noArgs_longVars = function ($longVar1,  $longerVar2= false) use (
36
-    $longVar1 ,  $longerVar2= false,
35
+$noArgs_longVars = function($longVar1, $longerVar2 = false) use (
36
+    $longVar1, $longerVar2 = false,
37 37
     $muchLongerVar3
38 38
 )  {
39 39
     // body
@@ -41,19 +41,19 @@  discard block
 block discarded – undo
41 41
 
42 42
 // @codingStandardsChangeSetting Squiz.Functions.FunctionDeclarationArgumentSpacing equalsSpacing 1
43 43
 function myFunc($blah = 'hello') {}
44
-function myFunc($blah  =  'hello') {}
45
-function myFunc($blah =  'hello') {}
44
+function myFunc($blah  = 'hello') {}
45
+function myFunc($blah = 'hello') {}
46 46
 function myFunc($blah  = 'hello') {}
47 47
 // @codingStandardsChangeSetting Squiz.Functions.FunctionDeclarationArgumentSpacing equalsSpacing 0
48 48
 
49 49
 // @codingStandardsChangeSetting Squiz.Functions.FunctionDeclarationArgumentSpacing requiredSpacesAfterOpen 1
50 50
 // @codingStandardsChangeSetting Squiz.Functions.FunctionDeclarationArgumentSpacing requiredSpacesBeforeClose 1
51 51
 function myFunc($blah) {}
52
-function myFunc( $blah ) {}
53
-function myFunc(  $blah  ) {}
54
-function myFunc( array $blah ) {}
55
-function myFunc(array $blah ) {}
56
-function myFunc(  array $blah ) {}
52
+function myFunc($blah) {}
53
+function myFunc($blah) {}
54
+function myFunc(array $blah) {}
55
+function myFunc(array $blah) {}
56
+function myFunc(array $blah) {}
57 57
 function myFunc() {}
58 58
 function myFunc( ) {}
59 59
 
@@ -61,16 +61,16 @@  discard block
 block discarded – undo
61 61
 	array $flatList,
62 62
 	$markup,
63 63
 	array $otherList,
64
-	$lastOffset=0
64
+	$lastOffset = 0
65 65
 ) {
66 66
 }
67 67
 // @codingStandardsChangeSetting Squiz.Functions.FunctionDeclarationArgumentSpacing requiredSpacesAfterOpen 0
68 68
 // @codingStandardsChangeSetting Squiz.Functions.FunctionDeclarationArgumentSpacing requiredSpacesBeforeClose 0
69 69
 
70
-function myFunc($req, $opt=null, ...$params) {}
70
+function myFunc($req, $opt = null, ...$params) {}
71 71
 function myFunc($param, &...$moreParams) {}
72 72
 
73 73
 function MissingParamTypeInDocBlock(array$a = null, callable$c, \ArrayObject$o, $foo = []) {}
74 74
 
75 75
 function myFunc(...$args) {}
76
-function myFunc( ...$args) {}
76
+function myFunc(...$args) {}
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 function myFunc($blah, $x, $blah) {}
3 3
 function myFunc($a, $b, $c) {}
4 4
 function myFunc($a, $a, $a) {}
5
-function myFunc($a='1', $b='1', $a='2') {}
5
+function myFunc($a = '1', $b = '1', $a = '2') {}
6 6
 ?>
Please login to merge, or discard this patch.