@@ -71,7 +71,7 @@ |
||
| 71 | 71 | public function testCreateWithAllSetting() : void |
| 72 | 72 | { |
| 73 | 73 | $path = realpath(__DIR__ . '/../../files/config/valid-with-all-settings.json'); |
| 74 | - $gitDir = \dirname($path) .DIRECTORY_SEPARATOR . '../../../.git'; |
|
| 74 | + $gitDir = \dirname($path) . DIRECTORY_SEPARATOR . '../../../.git'; |
|
| 75 | 75 | $config = Factory::create($path); |
| 76 | 76 | |
| 77 | 77 | $this->assertTrue($config->getHookConfig('pre-commit')->isEnabled()); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $this->expectException(\Exception::class); |
| 26 | 26 | |
| 27 | - $input = new ArrayInput( |
|
| 27 | + $input = new ArrayInput( |
|
| 28 | 28 | [ |
| 29 | 29 | 'hook' => 'pre-commit', |
| 30 | 30 | '--configuration' => 'foo' |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | { |
| 88 | 88 | $app = new Hook(); |
| 89 | 89 | |
| 90 | - $this->assertEquals(getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG, $app->getConfigFile()); |
|
| 90 | + $this->assertEquals(getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG, $app->getConfigFile()); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $config->expects($this->exactly(7))->method('getHookConfig')->willReturn($this->getHookConfigMock()); |
| 24 | 24 | $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', 'echo \'foo\'', 'n')); |
| 25 | 25 | |
| 26 | - $setup = new Advanced($io); |
|
| 26 | + $setup = new Advanced($io); |
|
| 27 | 27 | $setup->configureHooks($config); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', '\\Foo\\Bar', 'y', 'n')); |
| 39 | 39 | $io->expects($this->once())->method('askAndValidate')->willReturn('foo:bar'); |
| 40 | 40 | |
| 41 | - $setup = new Advanced($io); |
|
| 41 | + $setup = new Advanced($io); |
|
| 42 | 42 | $setup->configureHooks($config); |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $config->expects($this->exactly(2))->method('getHookConfig')->willReturn($this->getHookConfigMock()); |
| 24 | 24 | $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', 'y', 'phpunit', 'y', 'phpcs')); |
| 25 | 25 | |
| 26 | - $setup = new Express($io); |
|
| 26 | + $setup = new Express($io); |
|
| 27 | 27 | $setup->configureHooks($config); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | $this->expectException(\Exception::class); |
| 22 | 22 | |
| 23 | 23 | $path = realpath(CH_PATH_FILES . '/storage/invalid-xml.txt'); |
| 24 | - $file = new Xml($path); |
|
| 24 | + $file = new Xml($path); |
|
| 25 | 25 | $file->read(); |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $io = new NullIO(); |
| 79 | 79 | $config = new Config(CH_PATH_FILES . '/captainhook.json'); |
| 80 | - $repo = $this->createRepositoryMock(); |
|
| 80 | + $repo = $this->createRepositoryMock(); |
|
| 81 | 81 | $action = new Config\Action(Regex::class); |
| 82 | 82 | |
| 83 | 83 | $standard = new Regex(); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | 'error' => 'No match for %s' |
| 120 | 120 | ] |
| 121 | 121 | ); |
| 122 | - $repo = $this->createRepositoryMock(); |
|
| 122 | + $repo = $this->createRepositoryMock(); |
|
| 123 | 123 | $repo->expects($this->once())->method('getCommitMsg')->willReturn(new CommitMessage('Foo bar baz')); |
| 124 | 124 | |
| 125 | 125 | $standard = new Regex(); |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $this->markTestSkipped('not tested on windows'); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - $repo = new DummyRepo(); |
|
| 62 | + $repo = new DummyRepo(); |
|
| 63 | 63 | $repo->setup(); |
| 64 | 64 | |
| 65 | 65 | mkdir($repo->getPath() . DIRECTORY_SEPARATOR . 'vendor'); |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | public function getArgument(string $name, string $default = '') : string |
| 90 | 90 | { |
| 91 | - return (string)($this->getArguments()[$name] ?? $default); |
|
| 91 | + return (string) ($this->getArguments()[$name] ?? $default); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |