@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | return array( |
46 | 46 | 73 => 1, |
47 | - ); |
|
47 | + ); |
|
48 | 48 | |
49 | 49 | }//end getErrorList() |
50 | 50 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | return array( |
63 | 63 | 27 => 1, |
64 | 64 | 46 => 1, |
65 | - ); |
|
65 | + ); |
|
66 | 66 | |
67 | 67 | }//end getWarningList() |
68 | 68 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | return array( |
46 | 46 | 73 => 1, |
47 | - ); |
|
47 | + ); |
|
48 | 48 | |
49 | 49 | }//end getErrorList() |
50 | 50 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | return array( |
63 | 63 | 27 => 1, |
64 | 64 | 46 => 1, |
65 | - ); |
|
65 | + ); |
|
66 | 66 | |
67 | 67 | }//end getWarningList() |
68 | 68 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | ); |
80 | 80 | |
81 | 81 | array_map( |
82 | - function($x) |
|
83 | - { |
|
84 | - return trim($x); |
|
85 | - }, |
|
82 | + function($x) |
|
83 | + { |
|
84 | + return trim($x); |
|
85 | + }, |
|
86 | 86 | $array |
87 | 87 | ); |
88 | 88 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | 'is', |
174 | 174 | 'an', |
175 | 175 | 'array' |
176 | - ], |
|
176 | + ], |
|
177 | 177 | array( |
178 | 178 | 'this', |
179 | 179 | 'is', |
@@ -185,13 +185,13 @@ discard block |
||
185 | 185 | 'is', |
186 | 186 | 'an', |
187 | 187 | 'array' |
188 | - ), |
|
188 | + ), |
|
189 | 189 | function($x) |
190 | 190 | { |
191 | 191 | echo 'wee'; |
192 | 192 | |
193 | 193 | return trim($x); |
194 | - } |
|
194 | + } |
|
195 | 195 | ); |
196 | 196 | |
197 | 197 | function foo() |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $test = ' |
273 | 273 | ' . function_0( |
274 | 274 | $argument_0, |
275 | - $argument_1 |
|
275 | + $argument_1 |
|
276 | 276 | ); |
277 | 277 | } |
278 | 278 |
@@ -4,18 +4,18 @@ discard block |
||
4 | 4 | test($arg, $arg2); |
5 | 5 | isset (); |
6 | 6 | test( ); |
7 | -test() ; |
|
8 | -test( $arg); |
|
9 | -empty( $arg ); |
|
10 | -eval ( $arg ); |
|
7 | +test(); |
|
8 | +test($arg); |
|
9 | +empty($arg); |
|
10 | +eval ($arg); |
|
11 | 11 | |
12 | 12 | if (is_array($arg) === true) { |
13 | 13 | |
14 | 14 | } |
15 | 15 | |
16 | 16 | $something = get($arg1, $arg2); |
17 | -$something = get($arg1, $arg2) ; |
|
18 | -$something = get($arg1, $arg2) ; |
|
17 | +$something = get($arg1, $arg2); |
|
18 | +$something = get($arg1, $arg2); |
|
19 | 19 | |
20 | 20 | // No errors as this test only checks for function calls. |
21 | 21 | class TestClass extends MyClass |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | const const1 = 'hello'; |
25 | 25 | const CONST2 = 'hello'; |
26 | 26 | |
27 | - public function test () { } |
|
27 | + public function test() { } |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | make_foo($string/*the string*/, true/*test*/); |
31 | -make_foo($string/*the string*/, true/*test*/ ); |
|
31 | +make_foo($string/*the string*/, true/*test*/); |
|
32 | 32 | make_foo($string /*the string*/, true /*test*/); |
33 | 33 | make_foo(/*the string*/$string, /*test*/true); |
34 | 34 | make_foo( /*the string*/$string, /*test*/true); |
@@ -211,8 +211,8 @@ discard block |
||
211 | 211 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 1 |
212 | 212 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 1 |
213 | 213 | test($arg, $arg2); |
214 | -test( $arg, $arg2 ); |
|
215 | -test( $arg, $arg2 ); |
|
214 | +test($arg, $arg2); |
|
215 | +test($arg, $arg2); |
|
216 | 216 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 0 |
217 | 217 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 0 |
218 | 218 | |
@@ -231,10 +231,10 @@ discard block |
||
231 | 231 | |
232 | 232 | array_walk( |
233 | 233 | $types, |
234 | - function ($title, $type) { |
|
234 | + function($title, $type) { |
|
235 | 235 | $plural = 'all' !== $type ? 's' : ''; |
236 | 236 | ?> |
237 | - <li><a href="<?php esc_url('#tabs-documents-' . $type . $plural); ?>"><?php echo esc_html($title); ?></a></li> |
|
237 | + <li><a href="<?php esc_url('#tabs-documents-'.$type.$plural); ?>"><?php echo esc_html($title); ?></a></li> |
|
238 | 238 | <?php |
239 | 239 | } |
240 | 240 | ); |
@@ -278,27 +278,27 @@ discard block |
||
278 | 278 | |
279 | 279 | myFunction( |
280 | 280 | 'foo', (object) array( |
281 | - 'bar' => function ($x) { |
|
281 | + 'bar' => function($x) { |
|
282 | 282 | return true; |
283 | 283 | }, |
284 | 284 | 'baz' => false |
285 | 285 | ) |
286 | 286 | ); |
287 | 287 | $qux = array_filter( |
288 | - $quux, function ($x) { |
|
288 | + $quux, function($x) { |
|
289 | 289 | return $x; |
290 | 290 | } |
291 | 291 | ); |
292 | 292 | |
293 | 293 | array_filter( |
294 | 294 | [1, 2], |
295 | - function ($i) : bool { |
|
295 | + function($i) : bool { |
|
296 | 296 | return $i === 0; |
297 | 297 | } |
298 | 298 | ); |
299 | 299 | |
300 | 300 | foo(array( |
301 | - 'callback' => function () { |
|
301 | + 'callback' => function() { |
|
302 | 302 | $foo = 'foo'; |
303 | 303 | return; |
304 | 304 | }, |
@@ -11,32 +11,32 @@ discard block |
||
11 | 11 | } |
12 | 12 | |
13 | 13 | // Valid |
14 | -function myFunction($arg1, $arg2='hello') |
|
14 | +function myFunction($arg1, $arg2 = 'hello') |
|
15 | 15 | { |
16 | 16 | } |
17 | 17 | |
18 | 18 | // Valid with lots of args |
19 | -function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5=array(), $arg6='hello') |
|
19 | +function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5 = array(), $arg6 = 'hello') |
|
20 | 20 | { |
21 | 21 | } |
22 | 22 | |
23 | 23 | // Valid type hints |
24 | -function myFunction(array $arg1, array $arg2=array()) |
|
24 | +function myFunction(array $arg1, array $arg2 = array()) |
|
25 | 25 | { |
26 | 26 | } |
27 | 27 | |
28 | 28 | // Invalid |
29 | -function myFunction($arg2='hello', $arg1) |
|
29 | +function myFunction($arg2 = 'hello', $arg1) |
|
30 | 30 | { |
31 | 31 | } |
32 | 32 | |
33 | 33 | // Invalid with lots of args |
34 | -function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5, $arg6='hello') |
|
34 | +function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5, $arg6 = 'hello') |
|
35 | 35 | { |
36 | 36 | } |
37 | 37 | |
38 | 38 | // Invalid type hints |
39 | -function myFunction(array $arg2=array(), array $arg1) |
|
39 | +function myFunction(array $arg2 = array(), array $arg1) |
|
40 | 40 | { |
41 | 41 | } |
42 | 42 | |
@@ -53,34 +53,34 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | // Valid |
56 | - function myFunction($arg1, $arg2='hello') |
|
56 | + function myFunction($arg1, $arg2 = 'hello') |
|
57 | 57 | { |
58 | 58 | } |
59 | 59 | |
60 | 60 | // Valid with lots of args |
61 | - function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5=array(), $arg6='hello') |
|
61 | + function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5 = array(), $arg6 = 'hello') |
|
62 | 62 | { |
63 | 63 | } |
64 | 64 | |
65 | 65 | // Valid type hints |
66 | - function myFunction(array $arg1, array $arg2=array()) |
|
66 | + function myFunction(array $arg1, array $arg2 = array()) |
|
67 | 67 | { |
68 | 68 | } |
69 | 69 | |
70 | 70 | // Invalid |
71 | - function myFunction($arg2='hello', $arg1) |
|
71 | + function myFunction($arg2 = 'hello', $arg1) |
|
72 | 72 | { |
73 | 73 | } |
74 | 74 | |
75 | 75 | // Invalid with lots of args |
76 | - function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5, $arg6='hello') |
|
76 | + function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5, $arg6 = 'hello') |
|
77 | 77 | { |
78 | 78 | } |
79 | 79 | |
80 | 80 | // Invalid type hints |
81 | - function myFunction(array $arg2=array(), array $arg1) |
|
81 | + function myFunction(array $arg2 = array(), array $arg1) |
|
82 | 82 | { |
83 | 83 | } |
84 | 84 | } |
85 | 85 | |
86 | -function myFunc($req, $opt=null, ...$params) {} |
|
86 | +function myFunc($req, $opt = null, ...$params) {} |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | 54 => 1, |
65 | 65 | 70 => 1, |
66 | 66 | 71 => 1, |
67 | - ); |
|
67 | + ); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | return array( |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | 275 => 1, |
103 | 103 | 300 => 1, |
104 | 104 | 305 => 1, |
105 | - ); |
|
105 | + ); |
|
106 | 106 | |
107 | 107 | }//end getErrorList() |
108 | 108 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | * |
43 | 43 | * @return array<int, int> |
44 | 44 | */ |
45 | - public function getErrorList($testFile='FunctionCallSignatureUnitTest.inc') |
|
45 | + public function getErrorList($testFile = 'FunctionCallSignatureUnitTest.inc') |
|
46 | 46 | { |
47 | 47 | if ($testFile === 'FunctionCallSignatureUnitTest.js') { |
48 | 48 | return array( |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | public function someFunctionWithAVeryLongName($firstParameter='something', |
3 | - $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
4 | - $fifthParameter=123.12, $sixthParam=true |
|
3 | + $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
4 | + $fifthParameter=123.12, $sixthParam=true |
|
5 | 5 | ){ |
6 | 6 | } |
7 | 7 | |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | $url, |
66 | 66 | $requireScheme=TRUE, |
67 | 67 | array $allowedSchemes=array( |
68 | - 'http', |
|
69 | - 'https', |
|
70 | - ), |
|
68 | + 'http', |
|
69 | + 'https', |
|
70 | + ), |
|
71 | 71 | array $notAllowedSchemes=array('ftp', 'sftp') |
72 | 72 | ) { |
73 | 73 | } |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | -public function someFunctionWithAVeryLongName($firstParameter='something', |
|
3 | - $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
4 | - $fifthParameter=123.12, $sixthParam=true |
|
5 | -){ |
|
2 | +public function someFunctionWithAVeryLongName($firstParameter = 'something', |
|
3 | + $secondParameter = 'booooo', $third = null, $fourthParameter = false, |
|
4 | + $fifthParameter = 123.12, $sixthParam = true |
|
5 | +) { |
|
6 | 6 | } |
7 | 7 | |
8 | -function someFunctionWithAVeryLongName2($firstParameter='something', |
|
9 | -$secondParameter='booooo', $third=null, $fourthParameter=false, |
|
10 | -$fifthParameter=123.12, $sixthParam=true |
|
11 | -) { |
|
8 | +function someFunctionWithAVeryLongName2($firstParameter = 'something', |
|
9 | +$secondParameter = 'booooo', $third = null, $fourthParameter = false, |
|
10 | +$fifthParameter = 123.12, $sixthParam = true |
|
11 | +) { |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | function blah() { |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | class MyClass |
22 | 22 | { |
23 | 23 | |
24 | - public function someFunctionWithAVeryLongName($firstParameter='something', |
|
25 | - $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
26 | - $fifthParameter=123.12, $sixthParam=true |
|
24 | + public function someFunctionWithAVeryLongName($firstParameter = 'something', |
|
25 | + $secondParameter = 'booooo', $third = null, $fourthParameter = false, |
|
26 | + $fifthParameter = 123.12, $sixthParam = true |
|
27 | 27 | ) /** w00t */ { |
28 | 28 | } |
29 | 29 | |
30 | 30 | public function someFunctionWithAVeryLongName2( |
31 | - $firstParameter='something', $secondParameter='booooo', $third=null |
|
31 | + $firstParameter = 'something', $secondParameter = 'booooo', $third = null |
|
32 | 32 | ) { |
33 | 33 | } |
34 | 34 | |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | function getInstalledStandards( |
49 | - $includeGeneric=false, |
|
50 | - $standardsDir='' |
|
49 | + $includeGeneric = false, |
|
50 | + $standardsDir = '' |
|
51 | 51 | ) |
52 | 52 | { |
53 | 53 | } |
@@ -63,27 +63,27 @@ discard block |
||
63 | 63 | |
64 | 64 | function validateUrl( |
65 | 65 | $url, |
66 | - $requireScheme=TRUE, |
|
67 | - array $allowedSchemes=array( |
|
66 | + $requireScheme = TRUE, |
|
67 | + array $allowedSchemes = array( |
|
68 | 68 | 'http', |
69 | 69 | 'https', |
70 | 70 | ), |
71 | - array $notAllowedSchemes=array('ftp', 'sftp') |
|
71 | + array $notAllowedSchemes = array('ftp', 'sftp') |
|
72 | 72 | ) { |
73 | 73 | } |
74 | 74 | |
75 | 75 | function validateUrlShort( |
76 | 76 | $url, |
77 | - $requireScheme=TRUE, |
|
78 | - array $allowedSchemes=[ |
|
77 | + $requireScheme = TRUE, |
|
78 | + array $allowedSchemes = [ |
|
79 | 79 | 'http', |
80 | 80 | 'https', |
81 | 81 | ], |
82 | - array $notAllowedSchemes=['ftp', 'sftp'] |
|
82 | + array $notAllowedSchemes = ['ftp', 'sftp'] |
|
83 | 83 | ) { |
84 | 84 | } |
85 | 85 | |
86 | -$noArgs_longVars = function () use ( |
|
86 | +$noArgs_longVars = function() use ( |
|
87 | 87 | $longVar1, |
88 | 88 | $longerVar2, |
89 | 89 | $muchLongerVar3 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | // body |
92 | 92 | }; |
93 | 93 | |
94 | -$longArgs_longVars = function ( |
|
94 | +$longArgs_longVars = function( |
|
95 | 95 | $longArgument, |
96 | 96 | $longerArgument, |
97 | 97 | $muchLongerArgument |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | // body |
104 | 104 | }; |
105 | 105 | |
106 | -$longArgs_longVars = function ( |
|
106 | +$longArgs_longVars = function( |
|
107 | 107 | $longArgument, |
108 | 108 | $longerArgument, |
109 | 109 | $muchLongerArgument |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | // body |
116 | 116 | }; |
117 | 117 | |
118 | -$longArgs_longVars = function ( |
|
118 | +$longArgs_longVars = function( |
|
119 | 119 | $longArgument, |
120 | 120 | $muchLongerArgument)use( |
121 | 121 | $muchLongerVar3) { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | function test() |
126 | 126 | { |
127 | - $longArgs_longVars = function ( |
|
127 | + $longArgs_longVars = function( |
|
128 | 128 | $longArgument, |
129 | 129 | $longerArgument, |
130 | 130 | $muchLongerArgument |
@@ -158,10 +158,10 @@ discard block |
||
158 | 158 | f(); |
159 | 159 | } |
160 | 160 | |
161 | -$var = function() {return true;}; |
|
161 | +$var = function() {return true; }; |
|
162 | 162 | $var = function() {return true; |
163 | 163 | }; |
164 | -function blah(){return true; |
|
164 | +function blah() {return true; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | $closureWithArgsAndVars = function($arg1, $arg2) use ($var1, $var2){ |
@@ -169,8 +169,7 @@ discard block |
||
169 | 169 | }; |
170 | 170 | |
171 | 171 | function |
172 | -blah |
|
173 | -() |
|
172 | +blah() |
|
174 | 173 | { |
175 | 174 | // body |
176 | 175 | } |