@@ -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', |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | public function testFormatHeadlineShort(): void |
50 | 50 | { |
51 | - $text = str_repeat('x', 70) ; |
|
51 | + $text = str_repeat('x', 70); |
|
52 | 52 | $expected = '==== ' . $text . ' ===='; |
53 | 53 | $headline = IOUtil::formatHeadline($text, 80); |
54 | 54 |
@@ -126,7 +126,7 @@ |
||
126 | 126 | $config->method('getHookConfig')->willReturn($this->createHookConfigMock()); |
127 | 127 | $io->expects($invocations) |
128 | 128 | ->method('ask') |
129 | - ->willReturnCallback(function ($parameters) use ($invocations) { |
|
129 | + ->willReturnCallback(function($parameters) use ($invocations) { |
|
130 | 130 | $results = ['y', 'y', '\\Foo\\Bar', 'y', 'foo:bar', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n']; |
131 | 131 | return $results[$invocations->numberOfInvocations() - 1] ?? ''; |
132 | 132 | }); |
@@ -30,12 +30,12 @@ |
||
30 | 30 | $config->expects($this->exactly(2))->method('getHookConfig')->willReturn($this->createHookConfigMock()); |
31 | 31 | $io->expects($invokedCount) |
32 | 32 | ->method('ask') |
33 | - ->willReturnCallback(function ($parameters) use ($invokedCount) { |
|
33 | + ->willReturnCallback(function($parameters) use ($invokedCount) { |
|
34 | 34 | $results = ['y', 'y', 'y', 'phpunit', 'y', 'phpcs']; |
35 | 35 | return $results[$invokedCount->numberOfInvocations() - 1] ?? ''; |
36 | 36 | }); |
37 | 37 | |
38 | - $setup = new Express($io); |
|
38 | + $setup = new Express($io); |
|
39 | 39 | $setup->configureHooks($config); |
40 | 40 | } |
41 | 41 | } |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | $config->expects($this->exactly(9))->method('getHookConfig')->willReturn($this->createHookConfigMock()); |
31 | 31 | $io->expects($invocations) |
32 | 32 | ->method('ask') |
33 | - ->willReturnCallback(function ($parameters) use ($invocations) { |
|
33 | + ->willReturnCallback(function($parameters) use ($invocations) { |
|
34 | 34 | $results = ['y', 'y', 'echo \'foo\'', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n']; |
35 | 35 | return $results[$invocations->numberOfInvocations() - 1] ?? ''; |
36 | 36 | }); |
37 | 37 | |
38 | - $setup = new Advanced($io); |
|
38 | + $setup = new Advanced($io); |
|
39 | 39 | $setup->configureHooks($config); |
40 | 40 | } |
41 | 41 | |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | $config->method('getHookConfig')->willReturn($this->createHookConfigMock()); |
48 | 48 | $io->expects($invocations) |
49 | 49 | ->method('ask') |
50 | - ->willReturnCallback(function ($parameters) use ($invocations) { |
|
50 | + ->willReturnCallback(function($parameters) use ($invocations) { |
|
51 | 51 | $results = ['y', 'y', '\\Foo\\Bar', 'y', 'foo:bar', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n']; |
52 | 52 | return $results[$invocations->numberOfInvocations() - 1] ?? ''; |
53 | 53 | }); |
54 | 54 | |
55 | 55 | $io->expects($this->once())->method('askAndValidate')->willReturn('foo:bar'); |
56 | 56 | |
57 | - $setup = new Advanced($io); |
|
57 | + $setup = new Advanced($io); |
|
58 | 58 | $setup->configureHooks($config); |
59 | 59 | } |
60 | 60 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $io = $this->createIOMock(); |
35 | 35 | $io->expects($invocations) |
36 | 36 | ->method('ask') |
37 | - ->willReturnCallback(function ($parameters) use ($invocations) { |
|
37 | + ->willReturnCallback(function($parameters) use ($invocations) { |
|
38 | 38 | $results = ['y', 'y', '\\Foo\\Bar', 'y', 'foo:bar', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n']; |
39 | 39 | return $results[$invocations->numberOfInvocations() - 1] ?? ''; |
40 | 40 | }); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $io = $this->createIOMock(); |
63 | 63 | $io->expects($invocations) |
64 | 64 | ->method('ask') |
65 | - ->willReturnCallback(function ($parameters) use ($invocations) { |
|
65 | + ->willReturnCallback(function($parameters) use ($invocations) { |
|
66 | 66 | $results = ['y', 'y', '\\Foo\\Bar', 'y', 'foo:bar', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n']; |
67 | 67 | return $results[$invocations->numberOfInvocations() - 1] ?? ''; |
68 | 68 | }); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $this->statusOperator |
202 | 202 | ->expects($this->once()) |
203 | 203 | ->method('restoreWorkingTree') |
204 | - ->willReturnCallback(function (): bool { |
|
204 | + ->willReturnCallback(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); |