@@ -3,7 +3,7 @@ |
||
3 | 3 | class A { |
4 | 4 | public function foo($foo, C $c) : H |
5 | 5 | { |
6 | - $x = new B; |
|
6 | + $x = new B; |
|
7 | 7 | D::foo(); |
8 | 8 | } |
9 | 9 | } |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | public function foo($a, $b, $c) |
5 | 5 | { |
6 | - if(true) { |
|
6 | + if (true) { |
|
7 | 7 | return $c; |
8 | 8 | } else { |
9 | 9 | return $b; |
@@ -38,7 +38,7 @@ |
||
38 | 38 | |
39 | 39 | public function setB($b) |
40 | 40 | { |
41 | - $this->b = (string)$b; |
|
41 | + $this->b = (string) $b; |
|
42 | 42 | return $this; |
43 | 43 | } |
44 | 44 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -function f_switch($a){ |
|
3 | - switch ($a){ |
|
2 | +function f_switch($a) { |
|
3 | + switch ($a) { |
|
4 | 4 | case 0 : |
5 | 5 | printf("zero"); |
6 | 6 | case 10 : |
@@ -14,15 +14,15 @@ |
||
14 | 14 | if(true) { |
15 | 15 | |
16 | 16 | } else { |
17 | - if (true) { |
|
17 | + if (true) { |
|
18 | 18 | |
19 | - } else if (true) { |
|
19 | + } else if (true) { |
|
20 | 20 | |
21 | - } elseif (true) { |
|
21 | + } elseif (true) { |
|
22 | 22 | |
23 | - } elseif (true) { |
|
23 | + } elseif (true) { |
|
24 | 24 | |
25 | - } |
|
25 | + } |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | class A { |
3 | 3 | public function foo1() |
4 | 4 | { |
5 | - if(true) { |
|
6 | - if(false) { |
|
5 | + if (true) { |
|
6 | + if (false) { |
|
7 | 7 | |
8 | 8 | } |
9 | 9 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | public function foo2() |
13 | 13 | { |
14 | - if(true) { |
|
14 | + if (true) { |
|
15 | 15 | |
16 | 16 | } else { |
17 | 17 | if (true) { |
@@ -34,12 +34,12 @@ discard block |
||
34 | 34 | class B { |
35 | 35 | public function foo() |
36 | 36 | { |
37 | - if(true) { |
|
37 | + if (true) { |
|
38 | 38 | |
39 | 39 | } |
40 | 40 | |
41 | - foreach([] as $foo) { |
|
42 | - if(false) { |
|
41 | + foreach ([] as $foo) { |
|
42 | + if (false) { |
|
43 | 43 | continue; |
44 | 44 | } |
45 | 45 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | -function f_while($a){ |
|
2 | +function f_while($a) { |
|
3 | 3 | $i = 2; |
4 | 4 | if ($a < 0) return 0; |
5 | - while ($a > 0){ |
|
5 | + while ($a > 0) { |
|
6 | 6 | $a -= 100; |
7 | 7 | $i *= 2; |
8 | 8 | } |
@@ -1,7 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | function f_while($a){ |
3 | 3 | $i = 2; |
4 | - if ($a < 0) return 0; |
|
4 | + if ($a < 0) { |
|
5 | + return 0; |
|
6 | + } |
|
5 | 7 | while ($a > 0){ |
6 | 8 | $a -= 100; |
7 | 9 | $i *= 2; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | { |
13 | 13 | public function testPathsGivenAreRecoveredOverExcluded() |
14 | 14 | { |
15 | - $exampleRoot = __DIR__ . DIRECTORY_SEPARATOR . 'examples'; |
|
15 | + $exampleRoot = __DIR__.DIRECTORY_SEPARATOR.'examples'; |
|
16 | 16 | |
17 | 17 | $extensions = ['php', 'inc', 'phtml']; |
18 | 18 | $excludedDirs = [ |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | $files = $finder->fetch($inputFiles); |
27 | 27 | |
28 | 28 | $expected = [ |
29 | - $exampleRoot . DIRECTORY_SEPARATOR . 'included' . DIRECTORY_SEPARATOR . 'includedFile.php', |
|
30 | - $exampleRoot . DIRECTORY_SEPARATOR . 'includedFile.php.inc', |
|
29 | + $exampleRoot.DIRECTORY_SEPARATOR.'included'.DIRECTORY_SEPARATOR.'includedFile.php', |
|
30 | + $exampleRoot.DIRECTORY_SEPARATOR.'includedFile.php.inc', |
|
31 | 31 | ]; |
32 | 32 | |
33 | 33 | //Sorting the expected and the actual array values to assert both array are same. |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | |
40 | 40 | public function testGivenPathsAreIgnoredRegardingExclusion() |
41 | 41 | { |
42 | - $exampleRoot = __DIR__ . DIRECTORY_SEPARATOR . 'examples'; |
|
42 | + $exampleRoot = __DIR__.DIRECTORY_SEPARATOR.'examples'; |
|
43 | 43 | $actualFoundFiles = (new Finder(['php'], ['tests']))->fetch([$exampleRoot]); |
44 | 44 | $expectedFoundFiles = [ |
45 | - $exampleRoot . DIRECTORY_SEPARATOR . 'excluded' . DIRECTORY_SEPARATOR . 'excludedFile.php', |
|
46 | - $exampleRoot . DIRECTORY_SEPARATOR . 'included' . DIRECTORY_SEPARATOR . 'includedFile.php', |
|
45 | + $exampleRoot.DIRECTORY_SEPARATOR.'excluded'.DIRECTORY_SEPARATOR.'excludedFile.php', |
|
46 | + $exampleRoot.DIRECTORY_SEPARATOR.'included'.DIRECTORY_SEPARATOR.'includedFile.php', |
|
47 | 47 | ]; |
48 | 48 | sort($actualFoundFiles); |
49 | 49 | sort($expectedFoundFiles); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | |
66 | 66 | protected function terminate($status) |
67 | 67 | { |
68 | - throw new \RuntimeException('Terminated: ' . $status); |
|
68 | + throw new \RuntimeException('Terminated: '.$status); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | protected function log($logfile, $log) |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | { |
11 | 11 | public function testJsonConfigFile() |
12 | 12 | { |
13 | - $filename = __DIR__ . '/examples/config.json'; |
|
13 | + $filename = __DIR__.'/examples/config.json'; |
|
14 | 14 | |
15 | 15 | $config = new \Hal\Application\Config\Config(); |
16 | 16 | |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | { |
27 | 27 | return [ |
28 | 28 | 'exclude' => 'tests', |
29 | - 'report-html' => __DIR__ . '/examples/tmp/report/', |
|
29 | + 'report-html' => __DIR__.'/examples/tmp/report/', |
|
30 | 30 | 'report-json' => '/tmp/report.json', |
31 | 31 | 'report-csv' => '/tmp/report.csv', |
32 | 32 | 'report-violations' => '/tmp/violations.xml', |
33 | 33 | 'extensions' => 'php,php8', |
34 | 34 | 'git' => 'git', |
35 | 35 | 'files' => [ |
36 | - __DIR__ . '/examples/src/Hal/Component' |
|
36 | + __DIR__.'/examples/src/Hal/Component' |
|
37 | 37 | ], |
38 | 38 | 'groups' => [ |
39 | 39 | [ |