@@ -25,14 +25,14 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - $errors = []; |
|
28 | + $errors = [ ]; |
|
29 | 29 | |
30 | - if (PHP_VERSION_ID >= 70200) { |
|
31 | - $errors[3] = 1; |
|
30 | + if ( PHP_VERSION_ID >= 70200 ) { |
|
31 | + $errors[ 3 ] = 1; |
|
32 | 32 | } |
33 | 33 | |
34 | - if (PHP_VERSION_ID >= 70300) { |
|
35 | - $errors[4] = 1; |
|
34 | + if ( PHP_VERSION_ID >= 70300 ) { |
|
35 | + $errors[ 4 ] = 1; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return $errors; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function getWarningList() |
52 | 52 | { |
53 | - return []; |
|
53 | + return [ ]; |
|
54 | 54 | |
55 | 55 | }//end getWarningList() |
56 | 56 |
@@ -2,7 +2,7 @@ |
||
2 | 2 | /** |
3 | 3 | * @see something |
4 | 4 | */ |
5 | -if (@in_array($array, $needle)) |
|
5 | +if ( @in_array( $array, $needle ) ) |
|
6 | 6 | { |
7 | 7 | echo '@'; |
8 | 8 | } |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | -$size = sizeof($array); |
|
3 | -$size = count($array); |
|
4 | -delete($filepath); |
|
5 | -unset($filepath); |
|
6 | -$size = \sizeof($array); |
|
7 | -$size = \my\ns\sizeof('abc');($array); |
|
2 | +$size = sizeof( $array ); |
|
3 | +$size = count( $array ); |
|
4 | +delete( $filepath ); |
|
5 | +unset( $filepath ); |
|
6 | +$size = \sizeof( $array ); |
|
7 | +$size = \my\ns\sizeof( 'abc' ); ( $array ); |
|
8 | 8 | |
9 | 9 | // No errors thrown for class methods. |
10 | -$size = MyClass::sizeof($array); |
|
11 | -$size = MyClass::count($array); |
|
12 | -MyClass::delete($filepath); |
|
13 | -MyClass::unset($filepath); |
|
10 | +$size = MyClass::sizeof( $array ); |
|
11 | +$size = MyClass::count( $array ); |
|
12 | +MyClass::delete( $filepath ); |
|
13 | +MyClass::unset( $filepath ); |
|
14 | 14 | |
15 | -$size = $class->sizeof($array); |
|
16 | -$size = $class->count($array); |
|
17 | -$class->delete($filepath); |
|
18 | -$class->unset($filepath); |
|
15 | +$size = $class->sizeof( $array ); |
|
16 | +$size = $class->count( $array ); |
|
17 | +$class->delete( $filepath ); |
|
18 | +$class->unset( $filepath ); |
|
19 | 19 | |
20 | 20 | function delete() {} |
21 | 21 | function unset() {} |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $var = new Sizeof(); |
52 | 52 | class SizeOf implements Something {} |
53 | 53 | |
54 | -function mymodule_form_callback(SizeOf $sizeof) { |
|
54 | +function mymodule_form_callback( SizeOf $sizeof ) { |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | ?> |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | * |
23 | 23 | * @return string[] |
24 | 24 | */ |
25 | - protected function getTestFiles($testFileBase) |
|
25 | + protected function getTestFiles( $testFileBase ) |
|
26 | 26 | { |
27 | - $testFiles = [$testFileBase.'1.inc']; |
|
27 | + $testFiles = [ $testFileBase . '1.inc' ]; |
|
28 | 28 | |
29 | - $option = (bool) ini_get('short_open_tag'); |
|
30 | - if ($option === true) { |
|
31 | - $testFiles[] = $testFileBase.'2.inc'; |
|
29 | + $option = (bool)ini_get( 'short_open_tag' ); |
|
30 | + if ( $option === true ) { |
|
31 | + $testFiles[ ] = $testFileBase . '2.inc'; |
|
32 | 32 | } else { |
33 | - $testFiles[] = $testFileBase.'3.inc'; |
|
33 | + $testFiles[ ] = $testFileBase . '3.inc'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | return $testFiles; |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | * |
49 | 49 | * @return array<int, int> |
50 | 50 | */ |
51 | - public function getErrorList($testFile='') |
|
51 | + public function getErrorList( $testFile = '' ) |
|
52 | 52 | { |
53 | - switch ($testFile) { |
|
53 | + switch ( $testFile ) { |
|
54 | 54 | case 'DisallowShortOpenTagUnitTest.1.inc': |
55 | 55 | return [ |
56 | 56 | 5 => 1, |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | 7 => 1, |
67 | 67 | ]; |
68 | 68 | default: |
69 | - return []; |
|
69 | + return [ ]; |
|
70 | 70 | }//end switch |
71 | 71 | |
72 | 72 | }//end getErrorList() |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @return array<int, int> |
84 | 84 | */ |
85 | - public function getWarningList($testFile='') |
|
85 | + public function getWarningList( $testFile = '' ) |
|
86 | 86 | { |
87 | - switch ($testFile) { |
|
87 | + switch ( $testFile ) { |
|
88 | 88 | case 'DisallowShortOpenTagUnitTest.1.inc': |
89 | - return []; |
|
89 | + return [ ]; |
|
90 | 90 | case 'DisallowShortOpenTagUnitTest.3.inc': |
91 | 91 | return [ |
92 | 92 | 3 => 1, |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 11 => 1, |
95 | 95 | ]; |
96 | 96 | default: |
97 | - return []; |
|
97 | + return [ ]; |
|
98 | 98 | }//end switch |
99 | 99 | |
100 | 100 | }//end getWarningList() |
@@ -3,20 +3,20 @@ |
||
3 | 3 | class Something extends SomethingElse implements Whatever {} |
4 | 4 | abstract public private protected function whatever() {} |
5 | 5 | const array(); |
6 | -foreach ($var as $var) { exit; } |
|
7 | -if ($a and $b or $c xor $d) { die; } elseif( $var ) { } else {} |
|
6 | +foreach ( $var as $var ) { exit; } |
|
7 | +if ( $a and $b or $c xor $d ) { die; } elseif ( $var ) { } else {} |
|
8 | 8 | goto a; |
9 | 9 | |
10 | 10 | Class Something EXTENDS SomethingElse implementS Whatever {} |
11 | 11 | Abstract Public Private Protected function whatever() {} |
12 | 12 | CONST array(); |
13 | -ForEach ($var As $var) { Exit; } |
|
14 | -If ($a AND $b OR $c XOR $d) { Die; } ElseIf( $var ) { } Else {} |
|
13 | +ForEach ( $var As $var ) { Exit; } |
|
14 | +If ( $a AND $b OR $c XOR $d ) { Die; } ElseIf ( $var ) { } Else {} |
|
15 | 15 | GOTO a; |
16 | -$b = function (Array $a) {}; |
|
16 | +$b = function( Array $a ) {}; |
|
17 | 17 | const PRIVATE; |
18 | 18 | HttpStatus::CONTINUE; |
19 | -$c = Function ($f) { |
|
19 | +$c = Function( $f ) { |
|
20 | 20 | Yield $f; |
21 | 21 | Yield From fun(); |
22 | 22 | }; |
@@ -6,9 +6,9 @@ |
||
6 | 6 | a: |
7 | 7 | echo 'Bar'; |
8 | 8 | |
9 | -for($i=0,$j=50; $i<100; $i++) { |
|
10 | - while($j--) { |
|
11 | - if($j==17) goto end; |
|
9 | +for ( $i = 0, $j = 50; $i < 100; $i++ ) { |
|
10 | + while ( $j-- ) { |
|
11 | + if ( $j == 17 ) goto end; |
|
12 | 12 | } |
13 | 13 | } |
14 | 14 | echo "i = $i"; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | <script language="php"> |
5 | 5 | echo $var; |
6 | 6 | </script> |
7 | -<script language='php'>echo $var;</script> |
|
7 | +<script language='php'>echo $var; </script> |
|
8 | 8 | <script type="text/php" language="php"> |
9 | 9 | echo $var; |
10 | 10 | </script> |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return [2 => 2]; |
|
28 | + return [ 2 => 2 ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getWarningList() |
42 | 42 | { |
43 | - return []; |
|
43 | + return [ ]; |
|
44 | 44 | |
45 | 45 | }//end getWarningList() |
46 | 46 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return [2 => 1]; |
|
28 | + return [ 2 => 1 ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getWarningList() |
42 | 42 | { |
43 | - return []; |
|
43 | + return [ ]; |
|
44 | 44 | |
45 | 45 | }//end getWarningList() |
46 | 46 |