@@ -48,7 +48,7 @@ |
||
48 | 48 | { |
49 | 49 | $realConditions = []; |
50 | 50 | foreach ($conditions as $condition) { |
51 | - if (! $condition instanceof Condition) { |
|
51 | + if (!$condition instanceof Condition) { |
|
52 | 52 | continue; |
53 | 53 | } |
54 | 54 | $realConditions[] = $condition; |
@@ -139,7 +139,7 @@ |
||
139 | 139 | . 'found ' . $this->totalMatches . ' match' |
140 | 140 | . ($this->totalMatches > 1 ? 'es' : '') |
141 | 141 | . ' in ' . $filesFailed . ' file' |
142 | - . ($filesFailed > 1 ? 's' : '' ); |
|
142 | + . ($filesFailed > 1 ? 's' : ''); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $command = $io->getArgument(Hooks::ARG_COMMAND); |
51 | 51 | |
52 | 52 | /** @var \CaptainHook\App\Git\ChangedFiles\Detecting $class */ |
53 | - $class = self::$detectors[$command] ?? '\\CaptainHook\\App\\Git\\ChangedFiles\\Detector\\Fallback'; |
|
53 | + $class = self::$detectors[$command] ?? '\\CaptainHook\\App\\Git\\ChangedFiles\\Detector\\Fallback'; |
|
54 | 54 | return new $class($io, $repository); |
55 | 55 | } |
56 | 56 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | */ |
60 | 60 | public function handle(Event $event): void |
61 | 61 | { |
62 | - if (!IOUtil::answerToBool($event->io()->ask(PHP_EOL . $this->question . ' ', $this->default ? 'y' : 'n'))) { |
|
62 | + if (!IOUtil::answerToBool($event->io()->ask(PHP_EOL . $this->question . ' ', $this->default ? 'y' : 'n'))) { |
|
63 | 63 | throw new ActionFailed('no confirmation, abort!'); |
64 | 64 | } |
65 | 65 | } |
@@ -232,7 +232,7 @@ |
||
232 | 232 | $io = new DefaultIO($input, $output, $helper); |
233 | 233 | $answer = $io->askAndValidate( |
234 | 234 | 'foo', |
235 | - function () { |
|
235 | + function() { |
|
236 | 236 | return true; |
237 | 237 | } |
238 | 238 | ); |
@@ -166,7 +166,7 @@ |
||
166 | 166 | $repo = new Repository($fakeRepo->getRoot()); |
167 | 167 | |
168 | 168 | $config->method('isHookEnabled')->willReturnCallback( |
169 | - function (string $hook): bool { |
|
169 | + function(string $hook): bool { |
|
170 | 170 | return $hook === 'pre-push'; |
171 | 171 | } |
172 | 172 | ); |
@@ -228,7 +228,7 @@ |
||
228 | 228 | // if hook is configured and no force option is set |
229 | 229 | // ask the user if overwriting the hook is ok |
230 | 230 | if ($this->needConfirmation($hook)) { |
231 | - $ans = $this->io->ask( |
|
231 | + $ans = $this->io->ask( |
|
232 | 232 | 'The <comment>' . $hook . '</comment> hook exists! Overwrite? <comment>[y,N]</comment> ', |
233 | 233 | 'n' |
234 | 234 | ); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | ); |
82 | 82 | |
83 | 83 | if (IOUtil::answerToBool($answer)) { |
84 | - $call = '\\CaptainHook' . '\\App' . '\\Hook\\PHP\\Action\\Linting'; |
|
84 | + $call = '\\CaptainHook' . '\\App' . '\\Hook\\PHP\\Action\\Linting'; |
|
85 | 85 | $config->addAction(new Config\Action($call)); |
86 | 86 | } |
87 | 87 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ); |
125 | 125 | |
126 | 126 | if (IOUtil::answerToBool($answer)) { |
127 | - $call = $this->io->ask( |
|
127 | + $call = $this->io->ask( |
|
128 | 128 | ' <info>Enter the phpcs command you want to execute.</info> ' |
129 | 129 | . '<comment>[phpcs --standard=psr2 src]</comment> ', |
130 | 130 | 'phpcs --standard=psr2 src' |
@@ -109,7 +109,7 @@ |
||
109 | 109 | |
110 | 110 | $executableInclude = substr($executablePath, 0, 1) == '/' |
111 | 111 | ? '\'' . $executablePath . '\'' |
112 | - : '__DIR__ . \'/../../' . $executablePath . '\''; |
|
112 | + : '__DIR__ . \'/../../' . $executablePath . '\''; |
|
113 | 113 | |
114 | 114 | $bootstrapOption = $this->getBootstrapCmdOption(); |
115 | 115 | $bootstrapOptionQuoted = empty($bootstrapOption) ? '' : ' \'' . $bootstrapOption . '\','; |