@@ -101,7 +101,7 @@ |
||
101 | 101 | /** |
102 | 102 | * @param string $projectName |
103 | 103 | * @param string $branchName |
104 | - * @return array |
|
104 | + * @return string |
|
105 | 105 | * @throws BuildNotFoundException |
106 | 106 | */ |
107 | 107 | public function getLatestBuildFromBranch(string $projectName, string $branchName) : array |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace TheCodingMachine\WashingMachine\Clover; |
5 | 5 |
@@ -48,9 +48,9 @@ |
||
48 | 48 | throw new \RuntimeException('Could not find the Gitlab URL in the "CI_BUILD_REPO" environment variable (usually set by Gitlab CI). Either set this environment variable or pass the URL via the --gitlab-url command line option.'); |
49 | 49 | } |
50 | 50 | $parsed_url = parse_url($ciProjectUrl); |
51 | - $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; |
|
51 | + $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'].'://' : ''; |
|
52 | 52 | $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; |
53 | - $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; |
|
53 | + $port = isset($parsed_url['port']) ? ':'.$parsed_url['port'] : ''; |
|
54 | 54 | $gitlabUrl = $scheme.$host.$port; |
55 | 55 | } |
56 | 56 | return rtrim($gitlabUrl, '/'); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace TheCodingMachine\WashingMachine\Clover; |
5 | 5 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | // Now, let's order the differences by crap order. |
62 | 62 | usort($differences, function(Difference $d1, Difference $d2) { |
63 | - return $d2->getCrapScore() <=> $d1->getCrapScore(); |
|
63 | + return $d2->getCrapScore() <=> $d1->getCrapScore(); |
|
64 | 64 | }); |
65 | 65 | |
66 | 66 | // Now, let's limit the number of returned differences |
@@ -142,7 +142,7 @@ |
||
142 | 142 | |
143 | 143 | $buildService->dumpArtifactFromBranch($projectName, $targetBranch, $tmpFile); |
144 | 144 | $zipFile = new \ZipArchive(); |
145 | - if ($zipFile->open($tmpFile)!==true) { |
|
145 | + if ($zipFile->open($tmpFile) !== true) { |
|
146 | 146 | throw new \RuntimeException('Invalid ZIP archive '.$tmpFile); |
147 | 147 | } |
148 | 148 | $cloverFileString = $zipFile->getFromName($cloverPath); |
@@ -9,7 +9,6 @@ |
||
9 | 9 | use Symfony\Component\Console\Output\OutputInterface; |
10 | 10 | use TheCodingMachine\WashingMachine\Clover\CloverFile; |
11 | 11 | use TheCodingMachine\WashingMachine\Clover\Crap4JFile; |
12 | -use TheCodingMachine\WashingMachine\Clover\CrapMethodFetcherInterface; |
|
13 | 12 | use TheCodingMachine\WashingMachine\Clover\CrapMethodMerger; |
14 | 13 | use TheCodingMachine\WashingMachine\Clover\DiffService; |
15 | 14 | use TheCodingMachine\WashingMachine\Clover\EmptyCloverFile; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace TheCodingMachine\WashingMachine\Clover; |
5 | 5 |