@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public static function arrayToPath(array $path, bool $absolute = false) : string |
| 41 | 41 | { |
| 42 | - return ( $absolute ? DIRECTORY_SEPARATOR : '' ) . implode(DIRECTORY_SEPARATOR, $path); |
|
| 42 | + return ($absolute ? DIRECTORY_SEPARATOR : '') . implode(DIRECTORY_SEPARATOR, $path); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | 'CAPTAINHOOK FOUND ' . $err . ' PROBLEM' . ($err === 1 ? '' : 'S') . ' IN YOUR COMMIT MESSAGE', |
| 81 | 81 | IOUtil::getLineSeparator(80, '-') |
| 82 | 82 | ]; |
| 83 | - $msg = OutputUtil::trimEmptyLines($repository->getCommitMsg()->getLines()); |
|
| 83 | + $msg = OutputUtil::trimEmptyLines($repository->getCommitMsg()->getLines()); |
|
| 84 | 84 | |
| 85 | 85 | $lines = [IOUtil::getLineSeparator(80, '-')]; |
| 86 | 86 | foreach ($problems as $problem) { |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | { |
| 53 | 53 | $this->isCaseSensitive = $caseSensitive; |
| 54 | 54 | $this->hint = 'Commit message should not contain blacklisted words'; |
| 55 | - $this->stringDetection = function (string $content, string $term) : bool { |
|
| 55 | + $this->stringDetection = function(string $content, string $term) : bool { |
|
| 56 | 56 | return strpos($content, $term) !== false; |
| 57 | 57 | }; |
| 58 | 58 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | if ($checkOnlyBeginning) { |
| 45 | 45 | // overwrite the detection logic to only check the beginning og the string |
| 46 | - $this->stringDetection = function (string $content, string $term) : bool { |
|
| 46 | + $this->stringDetection = function(string $content, string $term) : bool { |
|
| 47 | 47 | return strpos($content, $term) === 0; |
| 48 | 48 | }; |
| 49 | 49 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | ksort($relevantContent); |
| 111 | 111 | |
| 112 | - return md5((string)json_encode($relevantContent)); |
|
| 112 | + return md5((string) json_encode($relevantContent)); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -124,6 +124,6 @@ discard block |
||
| 124 | 124 | if (!file_exists($file)) { |
| 125 | 125 | throw new \Exception($file . ' not found'); |
| 126 | 126 | } |
| 127 | - return (string)file_get_contents($file); |
|
| 127 | + return (string) file_get_contents($file); |
|
| 128 | 128 | } |
| 129 | 129 | } |