@@ -84,7 +84,7 @@ |
||
| 84 | 84 | { |
| 85 | 85 | $arg = new Arg( |
| 86 | 86 | $hook, |
| 87 | - static function (string $hook): bool { |
|
| 87 | + static function(string $hook): bool { |
|
| 88 | 88 | return !HookUtil::isInstallable($hook); |
| 89 | 89 | } |
| 90 | 90 | ); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * @param bool $assoc |
| 32 | 32 | * @return \stdClass|array<string, mixed>|null |
| 33 | 33 | */ |
| 34 | - public function read(bool $assoc = false): array|stdClass|null |
|
| 34 | + public function read(bool $assoc = false): array | stdClass | null |
|
| 35 | 35 | { |
| 36 | 36 | $json = json_decode(parent::read(), $assoc); |
| 37 | 37 | if (json_last_error() !== JSON_ERROR_NONE) { |
@@ -162,7 +162,7 @@ |
||
| 162 | 162 | { |
| 163 | 163 | $issueID = preg_replace_callback( |
| 164 | 164 | '/\$(\d+)/', |
| 165 | - function ($matches) use ($issueID) { |
|
| 165 | + function($matches) use ($issueID) { |
|
| 166 | 166 | return $matches[1] === '1' ? $issueID : ''; |
| 167 | 167 | }, |
| 168 | 168 | $pattern |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $this->io->write('<info>Unstaged intent-to-add files detected.</info>'); |
| 121 | 121 | |
| 122 | 122 | $this->repository->getIndexOperator()->removeFiles( |
| 123 | - array_map(function (Path $path): string { |
|
| 123 | + array_map(function(Path $path): string { |
|
| 124 | 124 | return $path->getPath(); |
| 125 | 125 | }, $this->intentToAddFiles), |
| 126 | 126 | false, |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | $this->repository->getIndexOperator()->recordIntentToAddFiles( |
| 144 | - array_map(function (Path $path): string { |
|
| 144 | + array_map(function(Path $path): string { |
|
| 145 | 145 | return $path->getPath(); |
| 146 | 146 | }, $this->intentToAddFiles) |
| 147 | 147 | ); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | // At this point, the working tree should be pristine, so the |
| 203 | 203 | // patch should cleanly apply. |
| 204 | - $this->applyPatch((string)$this->unstagedPatchFile); |
|
| 204 | + $this->applyPatch((string) $this->unstagedPatchFile); |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | $this->io->write("<info>Restored changes from {$this->unstagedPatchFile}.</info>"); |
@@ -228,7 +228,7 @@ |
||
| 228 | 228 | // if a 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 | ); |
@@ -140,6 +140,6 @@ |
||
| 140 | 140 | if (!$this->isLink()) { |
| 141 | 141 | throw new RuntimeException('Not a symbolic link: ' . $this->path); |
| 142 | 142 | } |
| 143 | - return (string)readlink($this->path); |
|
| 143 | + return (string) readlink($this->path); |
|
| 144 | 144 | } |
| 145 | 145 | } |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | $io = new DefaultIO($input, $output); |
| 247 | 247 | $io->askAndValidate( |
| 248 | 248 | 'foo', |
| 249 | - function () { |
|
| 249 | + function() { |
|
| 250 | 250 | return true; |
| 251 | 251 | } |
| 252 | 252 | ); |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | $io = new DefaultIO($input, $output, $helper); |
| 289 | 289 | $answer = $io->askAndValidate( |
| 290 | 290 | 'foo', |
| 291 | - function () { |
|
| 291 | + function() { |
|
| 292 | 292 | return true; |
| 293 | 293 | } |
| 294 | 294 | ); |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $invokedCount = $this->atLeast(2); |
| 63 | 63 | $io->expects($invokedCount) |
| 64 | 64 | ->method('ask') |
| 65 | - ->willReturnCallback(function ($parameters) use ($invokedCount) { |
|
| 65 | + ->willReturnCallback(function($parameters) use ($invokedCount) { |
|
| 66 | 66 | $results = ['\\Foo\\Bar', 'n']; |
| 67 | 67 | return $results[$invokedCount->numberOfInvocations() - 1] ?? ''; |
| 68 | 68 | }); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | public function testUninstallPreCommitHook(): void |
| 43 | 43 | { |
| 44 | - $repo = new DummyRepo([ |
|
| 44 | + $repo = new DummyRepo([ |
|
| 45 | 45 | 'config' => '# fake git config', |
| 46 | 46 | 'hooks' => [ |
| 47 | 47 | 'pre-commit' => '# fake pre-commit hook file', |