@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $config->expects($this->exactly(7))->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 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $config->expects($this->exactly(2))->method('getHookConfig')->willReturn($this->createHookConfigMock()); |
35 | 35 | $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', 'y', 'phpunit', 'y', 'phpcs')); |
36 | 36 | |
37 | - $setup = new Express($io); |
|
37 | + $setup = new Express($io); |
|
38 | 38 | $setup->configureHooks($config); |
39 | 39 | } |
40 | 40 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $this->expectException(Exception::class); |
25 | 25 | |
26 | 26 | $path = realpath(CH_PATH_FILES . '/storage/invalid-xml.txt'); |
27 | - $file = new Xml($path); |
|
27 | + $file = new Xml($path); |
|
28 | 28 | $file->read(); |
29 | 29 | } |
30 | 30 | } |
@@ -43,8 +43,8 @@ |
||
43 | 43 | $options = $action->getOptions(); |
44 | 44 | $book = new RuleBook(); |
45 | 45 | $book->setRules(RuleBook\RuleSet::beams( |
46 | - (int) $options->get('subjectLength', 50), |
|
47 | - (int) $options->get('bodyLineLength', 72), |
|
46 | + (int) $options->get('subjectLength', 50), |
|
47 | + (int) $options->get('bodyLineLength', 72), |
|
48 | 48 | (bool) $options->get('checkImperativeBeginningOnly', false) |
49 | 49 | )); |
50 | 50 |
@@ -23,8 +23,8 @@ |
||
23 | 23 | public function createIOMock(): IO |
24 | 24 | { |
25 | 25 | return $this->getMockBuilder(DefaultIO::class) |
26 | - ->disableOriginalConstructor() |
|
27 | - ->getMock(); |
|
26 | + ->disableOriginalConstructor() |
|
27 | + ->getMock(); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -105,7 +105,7 @@ |
||
105 | 105 | // callback to write bool true to all array entries |
106 | 106 | // to make sure the user will be asked to confirm every hook installation |
107 | 107 | // unless the user provided the force option |
108 | - $callback = function () { |
|
108 | + $callback = function() { |
|
109 | 109 | return true; |
110 | 110 | }; |
111 | 111 | // if a specific hook is set the user chose it so don't ask for permission anymore |
@@ -78,9 +78,9 @@ |
||
78 | 78 | $template = $this->createTemplateMock(); |
79 | 79 | |
80 | 80 | $template->expects($this->once()) |
81 | - ->method('getCode') |
|
82 | - ->with('pre-commit') |
|
83 | - ->willReturn(''); |
|
81 | + ->method('getCode') |
|
82 | + ->with('pre-commit') |
|
83 | + ->willReturn(''); |
|
84 | 84 | |
85 | 85 | $runner = new Installer($io, $config, $repo, $template); |
86 | 86 | $runner->setHook('pre-commit'); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | null, |
56 | 56 | ['captainhook.json' => file_get_contents(CH_PATH_FILES . '/config/valid.json')] |
57 | 57 | ); |
58 | - $input = new ArrayInput([ |
|
58 | + $input = new ArrayInput([ |
|
59 | 59 | 'hook' => 'pre-push', |
60 | 60 | '--configuration' => $fakeConfig->url() . '/captainhook.json', |
61 | 61 | ]); |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | { |
38 | 38 | parent::configure(); |
39 | 39 | $this->setName('configure') |
40 | - ->setDescription('Configure your hooks') |
|
41 | - ->setHelp('This command creates or updates your captainhook configuration') |
|
42 | - ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file') |
|
43 | - ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file') |
|
44 | - ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type') |
|
45 | - ->addOption( |
|
46 | - 'bootstrap', |
|
47 | - null, |
|
48 | - InputOption::VALUE_OPTIONAL, |
|
49 | - 'Path to composers vendor/autoload.php' |
|
50 | - ); |
|
40 | + ->setDescription('Configure your hooks') |
|
41 | + ->setHelp('This command creates or updates your captainhook configuration') |
|
42 | + ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file') |
|
43 | + ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file') |
|
44 | + ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type') |
|
45 | + ->addOption( |
|
46 | + 'bootstrap', |
|
47 | + null, |
|
48 | + InputOption::VALUE_OPTIONAL, |
|
49 | + 'Path to composers vendor/autoload.php' |
|
50 | + ); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | |
66 | 66 | $configurator = new Creator($io, $config); |
67 | 67 | $configurator->force(IOUtil::argToBool($input->getOption('force'))) |
68 | - ->extend(IOUtil::argToBool($input->getOption('extend'))) |
|
69 | - ->advanced(IOUtil::argToBool($input->getOption('advanced'))) |
|
70 | - ->setExecutable($this->resolver->getExecutable()) |
|
71 | - ->run(); |
|
68 | + ->extend(IOUtil::argToBool($input->getOption('extend'))) |
|
69 | + ->advanced(IOUtil::argToBool($input->getOption('advanced'))) |
|
70 | + ->setExecutable($this->resolver->getExecutable()) |
|
71 | + ->run(); |
|
72 | 72 | return 0; |
73 | 73 | } |
74 | 74 | } |