@@ -175,7 +175,7 @@ |
||
| 175 | 175 | // callback to write bool true to all array entries |
| 176 | 176 | // to make sure the user will be asked to confirm every hook installation |
| 177 | 177 | // unless the user provided the force or skip option |
| 178 | - $callback = function () { |
|
| 178 | + $callback = function() { |
|
| 179 | 179 | return true; |
| 180 | 180 | }; |
| 181 | 181 | // if a specific hook is set the user chose it so don't ask for permission anymore |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | $info = explode(' ', $stdIn[0]); |
| 104 | 104 | // If we find a rewritten commit, we return the first commit before the rewritten one. |
| 105 | 105 | // If we do not find any rewritten commits (awkward) we use the last ref-log position. |
| 106 | - return isset($info[1]) ? $info[1] . '^' : 'HEAD@{1}'; |
|
| 106 | + return isset($info[1]) ? $info[1] . '^' : 'HEAD@{1}'; |
|
| 107 | 107 | } |
| 108 | 108 | return $io->getArgument('previousHead', 'HEAD@{1}'); |
| 109 | 109 | } |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | // the config wll return the actually called config and then the virtual hook config |
| 50 | 50 | $config->expects($this->exactly(2)) |
| 51 | - ->method('getHookConfig') |
|
| 52 | - ->willReturnOnConsecutiveCalls($hookConfig, $vHookConfig); |
|
| 51 | + ->method('getHookConfig') |
|
| 52 | + ->willReturnOnConsecutiveCalls($hookConfig, $vHookConfig); |
|
| 53 | 53 | |
| 54 | 54 | $io->expects($this->atLeast(1))->method('write'); |
| 55 | 55 | |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | // the config wll return the actually called config and then the virtual hook config |
| 83 | 83 | $config->expects($this->exactly(2)) |
| 84 | - ->method('getHookConfig') |
|
| 85 | - ->willReturnOnConsecutiveCalls($hookConfig, $vHookConfig); |
|
| 84 | + ->method('getHookConfig') |
|
| 85 | + ->willReturnOnConsecutiveCalls($hookConfig, $vHookConfig); |
|
| 86 | 86 | |
| 87 | 87 | $io->expects($this->atLeast(1))->method('write'); |
| 88 | 88 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $config->expects($this->exactly(9))->method('getHookConfig')->willReturn($this->createHookConfigMock()); |
| 35 | 35 | $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', 'echo \'foo\'', 'n')); |
| 36 | 36 | |
| 37 | - $setup = new Advanced($io); |
|
| 37 | + $setup = new Advanced($io); |
|
| 38 | 38 | $setup->configureHooks($config); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', '\\Foo\\Bar', 'y', 'n')); |
| 52 | 52 | $io->expects($this->once())->method('askAndValidate')->willReturn('foo:bar'); |
| 53 | 53 | |
| 54 | - $setup = new Advanced($io); |
|
| 54 | + $setup = new Advanced($io); |
|
| 55 | 55 | $setup->configureHooks($config); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $io = new NullIO(); |
| 35 | 35 | $config = new Config(CH_PATH_FILES . '/captainhook.json'); |
| 36 | - $repo = $this->createRepositoryMock(); |
|
| 36 | + $repo = $this->createRepositoryMock(); |
|
| 37 | 37 | $action = new Config\Action(Regex::class); |
| 38 | 38 | |
| 39 | 39 | $standard = new IsEmpty(); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | CH_PATH_FILES . '/doesNotExist.txt', |
| 54 | 54 | CH_PATH_FILES . '/storage/empty.log', |
| 55 | 55 | ]]); |
| 56 | - $repo = $this->createRepositoryMock(); |
|
| 56 | + $repo = $this->createRepositoryMock(); |
|
| 57 | 57 | |
| 58 | 58 | $standard = new IsEmpty(); |
| 59 | 59 | $standard->execute($config, $io, $repo, $action); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | CH_PATH_FILES . '/storage/empty.log', // pass |
| 79 | 79 | CH_PATH_FILES . '/storage/test.json', // fail |
| 80 | 80 | ]]); |
| 81 | - $repo = $this->createRepositoryMock(); |
|
| 81 | + $repo = $this->createRepositoryMock(); |
|
| 82 | 82 | |
| 83 | 83 | $standard = new IsEmpty(); |
| 84 | 84 | $standard->execute($config, $io, $repo, $action); |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | // every action has to get executed |
| 78 | 78 | $actionConfigFail->expects($this->atLeastOnce()) |
| 79 | - ->method('getAction') |
|
| 80 | - ->willReturn(CH_PATH_FILES . '/bin/failure'); |
|
| 79 | + ->method('getAction') |
|
| 80 | + ->willReturn(CH_PATH_FILES . '/bin/failure'); |
|
| 81 | 81 | |
| 82 | 82 | // so even if the first actions fails this action has to get executed |
| 83 | 83 | $actionConfigSuccess->expects($this->atLeastOnce()) |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | $hookConfig->expects($this->once())->method('isEnabled')->willReturn(true); |
| 88 | 88 | $hookConfig->expects($this->once()) |
| 89 | - ->method('getActions') |
|
| 90 | - ->willReturn([$actionConfigFail, $actionConfigSuccess]); |
|
| 89 | + ->method('getActions') |
|
| 90 | + ->willReturn([$actionConfigFail, $actionConfigSuccess]); |
|
| 91 | 91 | |
| 92 | 92 | $config->expects($this->once())->method('getHookConfig')->willReturn($hookConfig); |
| 93 | 93 | $io->expects($this->atLeast(1))->method('write'); |