@@ -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 |
@@ -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 |
@@ -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 |
@@ -8,14 +8,14 @@ |
||
8 | 8 | { |
9 | 9 | public function getMergeBase(string $commit1, string $commit2) : string |
10 | 10 | { |
11 | - $results = $this->extractFromCommand('git merge-base ' . escapeshellarg($commit1). ' '. escapeshellarg($commit2)); |
|
11 | + $results = $this->extractFromCommand('git merge-base '.escapeshellarg($commit1).' '.escapeshellarg($commit2)); |
|
12 | 12 | |
13 | 13 | return $results[0]; |
14 | 14 | } |
15 | 15 | |
16 | 16 | public function getLatestCommitForBranch(string $branch) : string |
17 | 17 | { |
18 | - $results = $this->extractFromCommand('git log -n 1 --pretty=format:"%H" ' . escapeshellarg($branch)); |
|
18 | + $results = $this->extractFromCommand('git log -n 1 --pretty=format:"%H" '.escapeshellarg($branch)); |
|
19 | 19 | |
20 | 20 | return $results[0]; |
21 | 21 | } |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $url = $this->getArtifactFileUrl($file->getFilename(), $gitlabUrl, $projectName, $buildId); |
126 | 126 | |
127 | 127 | $this->msg .= sprintf("\n<strong>[%s](%s)</strong>\n", $file->getFilename(), $url); |
128 | - $this->msg .= sprintf("```\n%s%s```\n", $text, $isComplete?'':"... (file truncated)\n"); |
|
128 | + $this->msg .= sprintf("```\n%s%s```\n", $text, $isComplete ? '' : "... (file truncated)\n"); |
|
129 | 129 | |
130 | 130 | if (!$isComplete) { |
131 | 131 | $this->msg .= sprintf("[Download complete file](%s)\n", $url); |
@@ -53,9 +53,9 @@ |
||
53 | 53 | throw new \RuntimeException('Could not find the Gitlab URL in the "CI_REPOSITORY_URL" environment variable (usually set by Gitlab CI). Either set this environment variable or pass the URL via the --gitlab-url command line option.'); |
54 | 54 | } |
55 | 55 | $parsed_url = parse_url($ciProjectUrl); |
56 | - $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; |
|
56 | + $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'].'://' : ''; |
|
57 | 57 | $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; |
58 | - $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; |
|
58 | + $port = isset($parsed_url['port']) ? ':'.$parsed_url['port'] : ''; |
|
59 | 59 | $gitlabUrl = $scheme.$host.$port; |
60 | 60 | } |
61 | 61 | return rtrim($gitlabUrl, '/'); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | $commit = $project->commit($commitRef); |
245 | 245 | |
246 | - return $commit->committer ? $commit->committer->id : null; |
|
246 | + return $commit->committer ? $commit->committer->id : null; |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | /** |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | $buildService->dumpArtifactFromBranch($projectName, $targetBranch, $jobStage, $tmpFile); |
263 | 263 | $zipFile = new \ZipArchive(); |
264 | - if ($zipFile->open($tmpFile)!==true) { |
|
264 | + if ($zipFile->open($tmpFile) !== true) { |
|
265 | 265 | throw new \RuntimeException('Invalid ZIP archive '.$tmpFile); |
266 | 266 | } |
267 | 267 | return $this->getMeasuresFromZipFile($zipFile, $cloverPath, $crap4JPath); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $build = $buildService->getLatestPipelineFromCommitId($projectName, $commitId); |
286 | 286 | $buildService->dumpArtifact($projectName, $build['id'], $jobStage, $tmpFile); |
287 | 287 | $zipFile = new \ZipArchive(); |
288 | - if ($zipFile->open($tmpFile)!==true) { |
|
288 | + if ($zipFile->open($tmpFile) !== true) { |
|
289 | 289 | throw new \RuntimeException('Invalid ZIP archive '.$tmpFile); |
290 | 290 | } |
291 | 291 | return $this->getMeasuresFromZipFile($zipFile, $cloverPath, $crap4JPath); |