@@ -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 |
@@ -128,7 +128,7 @@ |
||
128 | 128 | |
129 | 129 | $buildService->dumpArtifactFromBranch($projectName, $targetBranch, $tmpFile); |
130 | 130 | $zipFile = new \ZipArchive(); |
131 | - if ($zipFile->open($tmpFile)!==true) { |
|
131 | + if ($zipFile->open($tmpFile) !== true) { |
|
132 | 132 | throw new \RuntimeException('Invalid ZIP archive '.$tmpFile); |
133 | 133 | } |
134 | 134 | $cloverFileString = $zipFile->getFromName('clover.xml'); |
@@ -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 $d1->getCrapScore() <=> $d2->getCrapScore(); |
|
63 | + return $d1->getCrapScore() <=> $d2->getCrapScore(); |
|
64 | 64 | }); |
65 | 65 | |
66 | 66 | // Now, let's limit the number of returned differences |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $differences = $this->diffService->getMeaningfulDifferences($cloverFile, $previousCloverFile); |
60 | 60 | |
61 | 61 | foreach ($differences as $difference) { |
62 | - $note = $this->getDifferencesHtml([ $difference ], $commitId, $gitlabUrl, $projectName); |
|
62 | + $note = $this->getDifferencesHtml([$difference], $commitId, $gitlabUrl, $projectName); |
|
63 | 63 | |
64 | 64 | $this->client->repositories->createCommitComment($projectName, $commitId, $note, [ |
65 | 65 | 'path' => $difference->getFile(), |
@@ -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 |