@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ); |
| 80 | 80 | |
| 81 | 81 | if (IOUtil::answerToBool($answer)) { |
| 82 | - $call = '\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting'; |
|
| 82 | + $call = '\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting'; |
|
| 83 | 83 | $config->addAction(new Config\Action($call)); |
| 84 | 84 | } |
| 85 | 85 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | ); |
| 123 | 123 | |
| 124 | 124 | if (IOUtil::answerToBool($answer)) { |
| 125 | - $call = $this->io->ask( |
|
| 125 | + $call = $this->io->ask( |
|
| 126 | 126 | ' <info>Enter the phpcs command you want to execute.</info> ' |
| 127 | 127 | . '<comment>[phpcs --standard=psr2 src]</comment> ', |
| 128 | 128 | 'phpcs --standard=psr2 src' |
@@ -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 | /** |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | $this->statusOperator |
| 202 | 202 | ->expects($this->once()) |
| 203 | 203 | ->method('restoreWorkingTree') |
| 204 | - ->will($this->returnCallback(function (): bool { |
|
| 204 | + ->will($this->returnCallback(function(): bool { |
|
| 205 | 205 | if (getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR) != '1') { |
| 206 | 206 | $this->fail(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR . ' did not have the correct value'); |
| 207 | 207 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $this->diffOperator |
| 212 | 212 | ->expects($this->once()) |
| 213 | 213 | ->method('applyPatches') |
| 214 | - ->with($this->callback(function ($value) use ($patchFileConstraint): bool { |
|
| 214 | + ->with($this->callback(function($value) use ($patchFileConstraint): bool { |
|
| 215 | 215 | $result = true; |
| 216 | 216 | foreach ($value as $item) { |
| 217 | 217 | $result = $result && $patchFileConstraint->evaluate($item, '', true); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | $this->diffOperator |
| 267 | 267 | ->expects($this->exactly(3)) |
| 268 | 268 | ->method('applyPatches') |
| 269 | - ->with($this->callback(function ($value) use ($patchFileConstraint): bool { |
|
| 269 | + ->with($this->callback(function($value) use ($patchFileConstraint): bool { |
|
| 270 | 270 | $result = true; |
| 271 | 271 | foreach ($value as $item) { |
| 272 | 272 | $result = $result && $patchFileConstraint->evaluate($item, '', true); |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | public function createConfigMock(bool $loadedFromFile = false, string $path = ''): CHConfig |
| 24 | 24 | { |
| 25 | 25 | $config = $this->getMockBuilder(CHConfig::class) |
| 26 | - ->disableOriginalConstructor() |
|
| 27 | - ->getMock(); |
|
| 26 | + ->disableOriginalConstructor() |
|
| 27 | + ->getMock(); |
|
| 28 | 28 | |
| 29 | 29 | $config->method('isLoadedFromFile')->willReturn($loadedFromFile); |
| 30 | 30 | $config->method('getPath')->willReturn($path); |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $input = new ArrayInput(['--version' => true]); |
| 28 | 28 | $output = $this->getMockBuilder(NullOutput::class) |
| 29 | - ->disableOriginalConstructor() |
|
| 30 | - ->getMock(); |
|
| 29 | + ->disableOriginalConstructor() |
|
| 30 | + ->getMock(); |
|
| 31 | 31 | |
| 32 | 32 | $output->expects($this->once())->method('writeLn'); |
| 33 | 33 | |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $input = new ArrayInput(['command' => 'list']); |
| 48 | 48 | $output = $this->getMockBuilder(NullOutput::class) |
| 49 | - ->disableOriginalConstructor() |
|
| 50 | - ->getMock(); |
|
| 49 | + ->disableOriginalConstructor() |
|
| 50 | + ->getMock(); |
|
| 51 | 51 | |
| 52 | 52 | $output->expects($this->atLeastOnce())->method('write'); |
| 53 | 53 | |