Completed
Branch master (d87ed9)
by Tomáš
06:31
created
Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.php 3 patches
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='FunctionOpeningBraceSpaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'FunctionOpeningBraceSpaceUnitTest.inc':
49
-            return array(
50
-                    10 => 1,
51
-                    25 => 1,
52
-                   );
53
-            break;
54
-        case 'FunctionOpeningBraceSpaceUnitTest.js':
55
-            return array(
56
-                    11 => 1,
57
-                    31 => 1,
58
-                    38 => 1,
59
-                    88 => 1,
60
-                   );
61
-            break;
62
-        default:
63
-            return array();
64
-            break;
48
+            case 'FunctionOpeningBraceSpaceUnitTest.inc':
49
+                return array(
50
+                        10 => 1,
51
+                        25 => 1,
52
+                       );
53
+                break;
54
+            case 'FunctionOpeningBraceSpaceUnitTest.js':
55
+                return array(
56
+                        11 => 1,
57
+                        31 => 1,
58
+                        38 => 1,
59
+                        88 => 1,
60
+                       );
61
+                break;
62
+            default:
63
+                return array();
64
+                break;
65 65
         }//end switch
66 66
         
67 67
 
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='FunctionOpeningBraceSpaceUnitTest.inc')
45
+    public function getErrorList($testFile = 'FunctionOpeningBraceSpaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'FunctionOpeningBraceSpaceUnitTest.inc':
Please login to merge, or discard this patch.
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.
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     if (!class_exists($class_name)) {
34 34
         echo $error;
35 35
     }
36
-    $this->{$property} =& new $class_name($this->db_index);
37
-    $this->modules[$module] =& $this->{$property};
36
+    $this->{$property} = & new $class_name($this->db_index);
37
+    $this->modules[$module] = & $this->{$property};
38 38
 }
39 39
 
40 40
 foreach ($elements as $element) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 ?>
64 64
 
65
-<?php while($row = $data->getRow()): ?>
65
+<?php while ($row = $data->getRow()): ?>
66 66
     <p><?= $val ?></p>
67 67
 <?php endwhile; ?>
68 68
 
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     function test1()
10 10
     {
11
-     }
11
+        }
12 12
 
13 13
     function test2() {}
14 14
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 class Test2
23 23
 {
24
- }
24
+    }
25 25
 
26 26
 
27 27
 public function test2()
Please login to merge, or discard this patch.
Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if ($foo || $bar) {}
4
-if ($foo||$bar && $baz) {}
5
-if ($foo|| $bar&&$baz) {}
6
-if ($foo  ||   $bar   && $baz) {}
4
+if ($foo || $bar && $baz) {}
5
+if ($foo || $bar && $baz) {}
6
+if ($foo || $bar && $baz) {}
7 7
 
8 8
 // Spacing after || below is ignored as it is EOL whitespace.
9 9
 if ($foo ||    
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 ) {
13 13
 }
14 14
 
15
-if ($foo||
15
+if ($foo ||
16 16
     $bar
17 17
     &&$baz
18 18
 ) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php 3 patches
Switch Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -45,110 +45,110 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='OperatorSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'OperatorSpacingUnitTest.inc':
49
-            return array(
50
-                    4   => 1,
51
-                    5   => 2,
52
-                    6   => 1,
53
-                    7   => 1,
54
-                    8   => 2,
55
-                    11  => 1,
56
-                    12  => 2,
57
-                    13  => 1,
58
-                    14  => 1,
59
-                    15  => 2,
60
-                    18  => 1,
61
-                    19  => 2,
62
-                    20  => 1,
63
-                    21  => 1,
64
-                    22  => 2,
65
-                    25  => 1,
66
-                    26  => 2,
67
-                    27  => 1,
68
-                    28  => 1,
69
-                    29  => 2,
70
-                    32  => 1,
71
-                    33  => 2,
72
-                    34  => 1,
73
-                    35  => 1,
74
-                    36  => 2,
75
-                    40  => 2,
76
-                    42  => 2,
77
-                    44  => 2,
78
-                    45  => 1,
79
-                    46  => 2,
80
-                    53  => 4,
81
-                    54  => 3,
82
-                    59  => 10,
83
-                    64  => 1,
84
-                    77  => 4,
85
-                    78  => 1,
86
-                    79  => 1,
87
-                    80  => 2,
88
-                    81  => 1,
89
-                    84  => 6,
90
-                    85  => 6,
91
-                    87  => 4,
92
-                    88  => 5,
93
-                    90  => 4,
94
-                    91  => 5,
95
-                    128 => 4,
96
-                    132 => 1,
97
-                    133 => 1,
98
-                    135 => 1,
99
-                    136 => 1,
100
-                    140 => 1,
101
-                    141 => 1,
102
-                    174 => 1,
103
-                    177 => 1,
104
-                    178 => 1,
105
-                    184 => 2,
106
-                   );
107
-            break;
108
-        case 'OperatorSpacingUnitTest.js':
109
-            return array(
110
-                    4  => 1,
111
-                    5  => 2,
112
-                    6  => 1,
113
-                    7  => 1,
114
-                    8  => 2,
115
-                    11 => 1,
116
-                    12 => 2,
117
-                    13 => 1,
118
-                    14 => 1,
119
-                    15 => 2,
120
-                    18 => 1,
121
-                    19 => 2,
122
-                    20 => 1,
123
-                    21 => 1,
124
-                    22 => 2,
125
-                    25 => 1,
126
-                    26 => 2,
127
-                    27 => 1,
128
-                    28 => 1,
129
-                    29 => 2,
130
-                    32 => 1,
131
-                    33 => 2,
132
-                    34 => 1,
133
-                    35 => 1,
134
-                    36 => 2,
135
-                    40 => 2,
136
-                    42 => 2,
137
-                    44 => 2,
138
-                    45 => 1,
139
-                    46 => 2,
140
-                    55 => 4,
141
-                    65 => 1,
142
-                    66 => 1,
143
-                    68 => 1,
144
-                    69 => 1,
145
-                    73 => 1,
146
-                    74 => 1,
147
-                   );
148
-            break;
149
-        default:
150
-            return array();
151
-            break;
48
+            case 'OperatorSpacingUnitTest.inc':
49
+                return array(
50
+                        4   => 1,
51
+                        5   => 2,
52
+                        6   => 1,
53
+                        7   => 1,
54
+                        8   => 2,
55
+                        11  => 1,
56
+                        12  => 2,
57
+                        13  => 1,
58
+                        14  => 1,
59
+                        15  => 2,
60
+                        18  => 1,
61
+                        19  => 2,
62
+                        20  => 1,
63
+                        21  => 1,
64
+                        22  => 2,
65
+                        25  => 1,
66
+                        26  => 2,
67
+                        27  => 1,
68
+                        28  => 1,
69
+                        29  => 2,
70
+                        32  => 1,
71
+                        33  => 2,
72
+                        34  => 1,
73
+                        35  => 1,
74
+                        36  => 2,
75
+                        40  => 2,
76
+                        42  => 2,
77
+                        44  => 2,
78
+                        45  => 1,
79
+                        46  => 2,
80
+                        53  => 4,
81
+                        54  => 3,
82
+                        59  => 10,
83
+                        64  => 1,
84
+                        77  => 4,
85
+                        78  => 1,
86
+                        79  => 1,
87
+                        80  => 2,
88
+                        81  => 1,
89
+                        84  => 6,
90
+                        85  => 6,
91
+                        87  => 4,
92
+                        88  => 5,
93
+                        90  => 4,
94
+                        91  => 5,
95
+                        128 => 4,
96
+                        132 => 1,
97
+                        133 => 1,
98
+                        135 => 1,
99
+                        136 => 1,
100
+                        140 => 1,
101
+                        141 => 1,
102
+                        174 => 1,
103
+                        177 => 1,
104
+                        178 => 1,
105
+                        184 => 2,
106
+                       );
107
+                break;
108
+            case 'OperatorSpacingUnitTest.js':
109
+                return array(
110
+                        4  => 1,
111
+                        5  => 2,
112
+                        6  => 1,
113
+                        7  => 1,
114
+                        8  => 2,
115
+                        11 => 1,
116
+                        12 => 2,
117
+                        13 => 1,
118
+                        14 => 1,
119
+                        15 => 2,
120
+                        18 => 1,
121
+                        19 => 2,
122
+                        20 => 1,
123
+                        21 => 1,
124
+                        22 => 2,
125
+                        25 => 1,
126
+                        26 => 2,
127
+                        27 => 1,
128
+                        28 => 1,
129
+                        29 => 2,
130
+                        32 => 1,
131
+                        33 => 2,
132
+                        34 => 1,
133
+                        35 => 1,
134
+                        36 => 2,
135
+                        40 => 2,
136
+                        42 => 2,
137
+                        44 => 2,
138
+                        45 => 1,
139
+                        46 => 2,
140
+                        55 => 4,
141
+                        65 => 1,
142
+                        66 => 1,
143
+                        68 => 1,
144
+                        69 => 1,
145
+                        73 => 1,
146
+                        74 => 1,
147
+                       );
148
+                break;
149
+            default:
150
+                return array();
151
+                break;
152 152
         }//end switch
153 153
 
154 154
     }//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='OperatorSpacingUnitTest.inc')
45
+    public function getErrorList($testFile = 'OperatorSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'OperatorSpacingUnitTest.inc':
Please login to merge, or discard this patch.
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.
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 $test = $this->testThis();
3
-$test = $this->testThis() ;
4
-$test = $this->testThis()           ;
5
-for ($var = 1   ; $var < 10  ; $var++) {
6
-    echo $var ;
3
+$test = $this->testThis();
4
+$test = $this->testThis();
5
+for ($var = 1; $var < 10; $var++) {
6
+    echo $var;
7 7
 }
8 8
 $test = $this->testThis()  /* comment here */;
9
-$test = $this->testThis()  /* comment here */  ;
9
+$test = $this->testThis()  /* comment here */;
10 10
 
11
-$hello ='foo';
11
+$hello = 'foo';
12 12
 ;
13 13
\ No newline at end of file
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.
CodeSniffer/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     function func1();
53 53
 
54 54
 
55
-    function func2() ;
55
+    function func2();
56 56
 
57 57
 
58 58
 }//end interface
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 function recurseCreateTree(
61 61
     array $flatList,
62 62
     $markup,
63
-    $lastOffset=0
63
+    $lastOffset = 0
64 64
 ) {
65 65
 }
66 66
 
67 67
 
68
-function test ( ){}
68
+function test( ) {}
69 69
 
70 70
 function parent() {}
71 71
 function self() {}
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.
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.