@@ -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); |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | $buildService->dumpArtifactFromBranch($projectName, $targetBranch, $jobStage, $tmpFile); |
| 272 | 272 | $zipFile = new \ZipArchive(); |
| 273 | - if ($zipFile->open($tmpFile)!==true) { |
|
| 273 | + if ($zipFile->open($tmpFile) !== true) { |
|
| 274 | 274 | throw new \RuntimeException('Invalid ZIP archive '.$tmpFile); |
| 275 | 275 | } |
| 276 | 276 | return $this->getMeasuresFromZipFile($zipFile, $cloverPath, $crap4JPath); |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | $build = $buildService->getLatestBuildFromCommitId($projectName, $commitId); |
| 295 | 295 | $buildService->dumpArtifact($projectName, $build['id'], $jobStage, $tmpFile); |
| 296 | 296 | $zipFile = new \ZipArchive(); |
| 297 | - if ($zipFile->open($tmpFile)!==true) { |
|
| 297 | + if ($zipFile->open($tmpFile) !== true) { |
|
| 298 | 298 | throw new \RuntimeException('Invalid ZIP archive '.$tmpFile); |
| 299 | 299 | } |
| 300 | 300 | return $this->getMeasuresFromZipFile($zipFile, $cloverPath, $crap4JPath); |
@@ -56,9 +56,9 @@ |
||
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | $parsed_url = parse_url($ciProjectUrl); |
| 59 | - $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; |
|
| 59 | + $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'].'://' : ''; |
|
| 60 | 60 | $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; |
| 61 | - $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; |
|
| 61 | + $port = isset($parsed_url['port']) ? ':'.$parsed_url['port'] : ''; |
|
| 62 | 62 | $gitlabUrl = $scheme.$host.$port; |
| 63 | 63 | } |
| 64 | 64 | return rtrim($gitlabUrl, '/'); |