@@ -54,7 +54,7 @@ |
||
| 54 | 54 | { |
| 55 | 55 | $this->isCaseSensitive = $caseSensitive; |
| 56 | 56 | $this->hint = 'Commit message should not contain blacklisted words'; |
| 57 | - $this->stringDetection = function (string $content, string $term): bool { |
|
| 57 | + $this->stringDetection = function(string $content, string $term): bool { |
|
| 58 | 58 | return strpos($content, $term) !== false; |
| 59 | 59 | }; |
| 60 | 60 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | ksort($relevantContent); |
| 114 | 114 | |
| 115 | - return md5((string)json_encode($relevantContent)); |
|
| 115 | + return md5((string) json_encode($relevantContent)); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -127,6 +127,6 @@ discard block |
||
| 127 | 127 | if (!file_exists($file)) { |
| 128 | 128 | throw new Exception($file . ' not found'); |
| 129 | 129 | } |
| 130 | - return (string)file_get_contents($file); |
|
| 130 | + return (string) file_get_contents($file); |
|
| 131 | 131 | } |
| 132 | 132 | } |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | */ |
| 91 | 91 | public function getArgument(string $name, string $default = ''): string |
| 92 | 92 | { |
| 93 | - return (string)($this->getArguments()[$name] ?? $default); |
|
| 93 | + return (string) ($this->getArguments()[$name] ?? $default); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -43,8 +43,8 @@ |
||
| 43 | 43 | $options = $action->getOptions(); |
| 44 | 44 | $book = new RuleBook(); |
| 45 | 45 | $book->setRules(RuleBook\RuleSet::beams( |
| 46 | - (int) $options->get('subjectLength', 50), |
|
| 47 | - (int) $options->get('bodyLineLength', 72), |
|
| 46 | + (int) $options->get('subjectLength', 50), |
|
| 47 | + (int) $options->get('bodyLineLength', 72), |
|
| 48 | 48 | (bool) $options->get('checkImperativeBeginningOnly', false) |
| 49 | 49 | )); |
| 50 | 50 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | ob_start(); |
| 107 | 107 | $class::$method(); |
| 108 | - return (string)ob_get_clean(); |
|
| 108 | + return (string) ob_get_clean(); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | private function isStaticMethodCall(string $class): bool |
| 136 | 136 | { |
| 137 | - return (bool)preg_match('#^\\\\.+::.+$#i', $class); |
|
| 137 | + return (bool) preg_match('#^\\\\.+::.+$#i', $class); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | $this->assertTrue( |
| 132 | 132 | $cio->askAndValidate( |
| 133 | 133 | 'foo', |
| 134 | - function () { |
|
| 134 | + function() { |
|
| 135 | 135 | return true; |
| 136 | 136 | }, |
| 137 | 137 | false, |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | true, |
| 127 | 127 | $this->io->askAndValidate( |
| 128 | 128 | 'foo', |
| 129 | - function () { |
|
| 129 | + function() { |
|
| 130 | 130 | return true; |
| 131 | 131 | }, |
| 132 | 132 | null, |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | true, |
| 111 | 111 | $io->askAndValidate( |
| 112 | 112 | 'foo', |
| 113 | - function () { |
|
| 113 | + function() { |
|
| 114 | 114 | return true; |
| 115 | 115 | }, |
| 116 | 116 | false, |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | null, |
| 56 | 56 | ['captainhook.json' => file_get_contents(CH_PATH_FILES . '/config/valid.json')] |
| 57 | 57 | ); |
| 58 | - $input = new ArrayInput([ |
|
| 58 | + $input = new ArrayInput([ |
|
| 59 | 59 | 'hook' => 'pre-push', |
| 60 | 60 | '--configuration' => $fakeConfig->url() . '/captainhook.json', |
| 61 | 61 | ]); |