@@ -1,86 +1,81 @@ |
||
1 | 1 | <?php |
2 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
3 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
4 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
5 | -if (!foo() && (!$x || true)) {} |
|
6 | -$var = !($x || $y); |
|
7 | -$var = ! ($x || $y); |
|
8 | -$var = ! /*comment*/ ($x || $y); |
|
2 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
3 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
4 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
5 | +if ( ! foo() && ( ! $x || true ) ) {} |
|
6 | +$var = ! ( $x || $y ); |
|
7 | +$var = ! ( $x || $y ); |
|
8 | +$var = ! /*comment*/ ( $x || $y ); |
|
9 | 9 | |
10 | -$baz = function () { |
|
11 | - return ! $bar; |
|
10 | +$baz = function() { |
|
11 | + return ! $bar; |
|
12 | 12 | }; |
13 | 13 | |
14 | -if ( ! |
|
15 | - ($x || $y) |
|
14 | +if ( ! ( $x || $y ) |
|
16 | 15 | ) { |
17 | - return !$bar; |
|
16 | + return ! $bar; |
|
18 | 17 | } |
19 | 18 | |
20 | 19 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
21 | - ($x || $y) |
|
20 | + ( $x || $y ) |
|
22 | 21 | ) {} |
23 | 22 | |
24 | 23 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines true |
25 | -if ( ! |
|
26 | - ($x || $y) |
|
24 | +if ( ! ( $x || $y ) |
|
27 | 25 | ) { |
28 | - return !$bar; |
|
26 | + return ! $bar; |
|
29 | 27 | } |
30 | 28 | |
31 | 29 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
32 | - ($x || $y) |
|
30 | + ( $x || $y ) |
|
33 | 31 | ) {} |
34 | 32 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines false |
35 | 33 | |
36 | 34 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 2 |
37 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
38 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
39 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
40 | -if (!foo() && (! $x || true)) {} |
|
41 | -$var = ! ($x || $y); |
|
42 | -$var = ! ($x || $y); |
|
35 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
36 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
37 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
38 | +if ( ! foo() && ( ! $x || true ) ) {} |
|
39 | +$var = ! ( $x || $y ); |
|
40 | +$var = ! ( $x || $y ); |
|
43 | 41 | |
44 | -$baz = function () { |
|
45 | - return ! $bar; |
|
42 | +$baz = function() { |
|
43 | + return ! $bar; |
|
46 | 44 | }; |
47 | 45 | |
48 | -if ( ! |
|
49 | - ($x || $y) |
|
46 | +if ( ! ( $x || $y ) |
|
50 | 47 | ) { |
51 | - return !$bar; |
|
48 | + return ! $bar; |
|
52 | 49 | } |
53 | 50 | |
54 | 51 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 0 |
55 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
56 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
57 | -if (! foo() && (!$x || true)) {} |
|
58 | -$var = ! ($x || $y); |
|
59 | -$var = ! /*comment*/ ($x || $y); |
|
52 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
53 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
54 | +if ( ! foo() && ( ! $x || true ) ) {} |
|
55 | +$var = ! ( $x || $y ); |
|
56 | +$var = ! /*comment*/ ( $x || $y ); |
|
60 | 57 | |
61 | -$baz = function () { |
|
62 | - return ! $bar; |
|
58 | +$baz = function() { |
|
59 | + return ! $bar; |
|
63 | 60 | }; |
64 | 61 | |
65 | -if ( ! |
|
66 | - ($x || $y) |
|
62 | +if ( ! ( $x || $y ) |
|
67 | 63 | ) { |
68 | 64 | return ! $bar; |
69 | 65 | } |
70 | 66 | |
71 | 67 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
72 | - ($x || $y) |
|
68 | + ( $x || $y ) |
|
73 | 69 | ) {} |
74 | 70 | |
75 | 71 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines true |
76 | -if ( ! |
|
77 | - ($x || $y) |
|
72 | +if ( ! ( $x || $y ) |
|
78 | 73 | ) { |
79 | - return ! $bar; |
|
74 | + return ! $bar; |
|
80 | 75 | } |
81 | 76 | |
82 | 77 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
83 | - ($x || $y) |
|
78 | + ( $x || $y ) |
|
84 | 79 | ) {} |
85 | 80 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines false |
86 | 81 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 1 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | -$y = 2;; |
|
2 | +$y = 2; ; |
|
3 | 3 | echo $y; |
4 | -for ($i = 1; $i < $length; $i++) {} |
|
5 | -for (; $i < $length; $i++) {} |
|
4 | +for ( $i = 1; $i < $length; $i++ ) {} |
|
5 | +for ( ; $i < $length; $i++ ) {} |
|
6 | 6 | echo 'x'; echo $y; |
7 | 7 | $x = 10; echo $y; |
8 | 8 | $this->wizardid = 10; $this->paint(); echo 'x'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return []; |
|
28 | + return [ ]; |
|
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 [5 => 1]; |
|
43 | + return [ 5 => 1 ]; |
|
44 | 44 | |
45 | 45 | }//end getWarningList() |
46 | 46 |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | -if (php_sapi_name() !== 'cli') {} |
|
3 | -if (PHP_SAPI !== 'cli') {} |
|
4 | -if ($object->php_sapi_name() === true) {} |
|
2 | +if ( php_sapi_name() !== 'cli' ) {} |
|
3 | +if ( PHP_SAPI !== 'cli' ) {} |
|
4 | +if ( $object->php_sapi_name() === true ) {} |
@@ -1,51 +1,51 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // True |
4 | -function myFunction($arg1, $arg2=TRUE) |
|
4 | +function myFunction( $arg1, $arg2 = TRUE ) |
|
5 | 5 | { |
6 | 6 | } |
7 | -function myFunction($arg1, $arg2=true) |
|
7 | +function myFunction( $arg1, $arg2 = true ) |
|
8 | 8 | { |
9 | 9 | } |
10 | -function myFunction($arg1, $arg2=True) |
|
10 | +function myFunction( $arg1, $arg2 = True ) |
|
11 | 11 | { |
12 | 12 | } |
13 | 13 | |
14 | -if ($variable === TRUE) { } |
|
15 | -if ($variable === true) { } |
|
16 | -if ($variable === True) { } |
|
14 | +if ( $variable === TRUE ) { } |
|
15 | +if ( $variable === true ) { } |
|
16 | +if ( $variable === True ) { } |
|
17 | 17 | |
18 | 18 | |
19 | 19 | // False |
20 | -function myFunction($arg1, $arg2=FALSE) |
|
20 | +function myFunction( $arg1, $arg2 = FALSE ) |
|
21 | 21 | { |
22 | 22 | } |
23 | -function myFunction($arg1, $arg2=false) |
|
23 | +function myFunction( $arg1, $arg2 = false ) |
|
24 | 24 | { |
25 | 25 | } |
26 | -function myFunction($arg1, $arg2=False) |
|
26 | +function myFunction( $arg1, $arg2 = False ) |
|
27 | 27 | { |
28 | 28 | } |
29 | 29 | |
30 | -if ($variable === FALSE) { } |
|
31 | -if ($variable === false) { } |
|
32 | -if ($variable === False) { } |
|
30 | +if ( $variable === FALSE ) { } |
|
31 | +if ( $variable === false ) { } |
|
32 | +if ( $variable === False ) { } |
|
33 | 33 | |
34 | 34 | |
35 | 35 | // Null |
36 | -function myFunction($arg1, $arg2=NULL) |
|
36 | +function myFunction( $arg1, $arg2 = NULL ) |
|
37 | 37 | { |
38 | 38 | } |
39 | -function myFunction($arg1, $arg2=null) |
|
39 | +function myFunction( $arg1, $arg2 = null ) |
|
40 | 40 | { |
41 | 41 | } |
42 | -function myFunction($arg1, $arg2=Null) |
|
42 | +function myFunction( $arg1, $arg2 = Null ) |
|
43 | 43 | { |
44 | 44 | } |
45 | 45 | |
46 | -if ($variable === NULL) { } |
|
47 | -if ($variable === null) { } |
|
48 | -if ($variable === Null) { } |
|
46 | +if ( $variable === NULL ) { } |
|
47 | +if ( $variable === null ) { } |
|
48 | +if ( $variable === Null ) { } |
|
49 | 49 | |
50 | 50 | $x = new stdClass(); |
51 | 51 | $x->null = 7; |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | { |
64 | 64 | public function myFunction() |
65 | 65 | { |
66 | - $var = array('foo' => new True()); |
|
66 | + $var = array( 'foo' => new True() ); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | -$x = $f?false:TRUE; |
|
71 | -$x = $f? false:TRUE; |
|
70 | +$x = $f ?false:TRUE; |
|
71 | +$x = $f ? false:TRUE; |
|
72 | 72 | |
73 | 73 | class MyClass |
74 | 74 | { |
@@ -76,6 +76,6 @@ discard block |
||
76 | 76 | const true = FALSE; |
77 | 77 | } |
78 | 78 | |
79 | -var_dump(MyClass::true); |
|
79 | +var_dump( MyClass::true ); |
|
80 | 80 | |
81 | 81 | function true() {} |
82 | 82 | \ No newline at end of file |
@@ -1,35 +1,35 @@ discard block |
||
1 | 1 | <?php |
2 | -$foo = (int) $bar; |
|
3 | -$foo = (integer) $bar; |
|
4 | -$foo = (bool) $bar; |
|
5 | -$foo = (boolean) $bar; |
|
6 | -$foo = (float) $bar; |
|
7 | -$foo = (double) $bar; |
|
8 | -$foo = (real) $bar; |
|
9 | -$foo = (string) $bar; |
|
10 | -$foo = (array) $bar; |
|
11 | -$foo = (object) $bar; |
|
12 | -$foo = (unset) $bar; |
|
2 | +$foo = (int)$bar; |
|
3 | +$foo = (integer)$bar; |
|
4 | +$foo = (bool)$bar; |
|
5 | +$foo = (boolean)$bar; |
|
6 | +$foo = (float)$bar; |
|
7 | +$foo = (double)$bar; |
|
8 | +$foo = (real)$bar; |
|
9 | +$foo = (string)$bar; |
|
10 | +$foo = (array)$bar; |
|
11 | +$foo = (object)$bar; |
|
12 | +$foo = (unset)$bar; |
|
13 | 13 | |
14 | -$foo = (Int) $bar; |
|
15 | -$foo = (INTEGER) $bar; |
|
16 | -$foo = (BOOL) $bar; |
|
17 | -$foo = (String) $bar; |
|
18 | -$foo = (Array) $bar; |
|
14 | +$foo = (Int)$bar; |
|
15 | +$foo = (INTEGER)$bar; |
|
16 | +$foo = (BOOL)$bar; |
|
17 | +$foo = (String)$bar; |
|
18 | +$foo = (Array)$bar; |
|
19 | 19 | |
20 | -function foo(int $a, string $b, bool $c, array $d, Foo\Bar $e) : int {} |
|
21 | -function foo(Int $a, String $b, BOOL $c, Array $d, Foo\Bar $e) : Foo\Bar {} |
|
22 | -function foo(Int $a, Bar $b, BOOL $c, Array $d, Foo\Bar $e) : Bar {} |
|
23 | -function foo(callable $a, Callable $b, self $c, Iterable $d, iterable $e) : Float {} |
|
20 | +function foo( int $a, string $b, bool $c, array $d, Foo\Bar $e ) : int {} |
|
21 | +function foo( Int $a, String $b, BOOL $c, Array $d, Foo\Bar $e ) : Foo\Bar {} |
|
22 | +function foo( Int $a, Bar $b, BOOL $c, Array $d, Foo\Bar $e ) : Bar {} |
|
23 | +function foo( callable $a, Callable $b, self $c, Iterable $d, iterable $e ) : Float {} |
|
24 | 24 | |
25 | -$foo = function (int $a, Bool $b) {}; |
|
26 | -$foo = function (int $a, Callable $b) :INT{}; |
|
27 | -$foo = function (BOOL $a, float $b) use ($foo) : INT {}; |
|
28 | -$foo = function (Foo $a, Foo\Bar $b) use ($foo) : \Foo\Bar {}; |
|
29 | -$foo = function (bool $a, callable $b) use ($foo) : Bar {}; |
|
25 | +$foo = function( int $a, Bool $b ) {}; |
|
26 | +$foo = function( int $a, Callable $b ) :INT{}; |
|
27 | +$foo = function( BOOL $a, float $b ) use ( $foo ) : INT {}; |
|
28 | +$foo = function( Foo $a, Foo\Bar $b ) use ( $foo ) : \Foo\Bar {}; |
|
29 | +$foo = function( bool $a, callable $b ) use ( $foo ) : Bar {}; |
|
30 | 30 | |
31 | 31 | class Testing { |
32 | - public function TestThis(SELF $a, obJect $b, Parent $c) : VOID {} |
|
32 | + public function TestThis( SELF $a, obJect $b, Parent $c ) : VOID {} |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | function foo( |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | ?Foo\Bar $e |
41 | 41 | ) : ?Foo\Bar {} |
42 | 42 | |
43 | -$foo = function (?Int $a, ? Callable $b) |
|
44 | - :?INT{}; |
|
43 | +$foo = function( ?Int $a, ? Callable $b ) |
|
44 | + : ?INT{}; |
|
45 | 45 | |
46 | -$var = (BInARY) $string; |
|
46 | +$var = (BInARY)$string; |
|
47 | 47 | $var = (binary)$string; |
@@ -25,14 +25,14 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='') |
|
28 | + public function getErrorList( $testFile = '' ) |
|
29 | 29 | { |
30 | - switch ($testFile) { |
|
30 | + switch ( $testFile ) { |
|
31 | 31 | case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
32 | - return [2 => 1]; |
|
32 | + return [ 2 => 1 ]; |
|
33 | 33 | break; |
34 | 34 | default: |
35 | - return []; |
|
35 | + return [ ]; |
|
36 | 36 | break; |
37 | 37 | }//end switch |
38 | 38 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function getWarningList() |
51 | 51 | { |
52 | - return []; |
|
52 | + return [ ]; |
|
53 | 53 | |
54 | 54 | }//end getWarningList() |
55 | 55 |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='LowerCaseConstantUnitTest.inc') |
|
28 | + public function getErrorList( $testFile = 'LowerCaseConstantUnitTest.inc' ) |
|
29 | 29 | { |
30 | - switch ($testFile) { |
|
30 | + switch ( $testFile ) { |
|
31 | 31 | case 'LowerCaseConstantUnitTest.inc': |
32 | 32 | return [ |
33 | 33 | 7 => 1, |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ]; |
60 | 60 | break; |
61 | 61 | default: |
62 | - return []; |
|
62 | + return [ ]; |
|
63 | 63 | break; |
64 | 64 | }//end switch |
65 | 65 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function getWarningList() |
78 | 78 | { |
79 | - return []; |
|
79 | + return [ ]; |
|
80 | 80 | |
81 | 81 | }//end getWarningList() |
82 | 82 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return [9 => 1]; |
|
28 | + return [ 9 => 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 |