@@ -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 |
@@ -60,49 +60,49 @@ discard block |
||
60 | 60 | { |
61 | 61 | parent::configure(); |
62 | 62 | $this->setName('install') |
63 | - ->setDescription('Install git hooks') |
|
64 | - ->setHelp('This command will install the git hooks to your .git directory') |
|
65 | - ->addArgument( |
|
66 | - 'hook', |
|
67 | - InputArgument::OPTIONAL, |
|
68 | - 'Limit the hook you want to install. By default all hooks get installed.' |
|
69 | - ) |
|
70 | - ->addOption( |
|
71 | - 'force', |
|
72 | - 'f', |
|
73 | - InputOption::VALUE_NONE, |
|
74 | - 'Force install without confirmation' |
|
75 | - ) |
|
76 | - ->addOption( |
|
77 | - 'skip-existing', |
|
78 | - 's', |
|
79 | - InputOption::VALUE_NONE, |
|
80 | - 'Do not overwrite existing hooks' |
|
81 | - ) |
|
82 | - ->addOption( |
|
83 | - 'bootstrap', |
|
84 | - 'b', |
|
85 | - InputOption::VALUE_OPTIONAL, |
|
86 | - 'Path to composers vendor/autoload.php' |
|
87 | - ) |
|
88 | - ->addOption( |
|
89 | - 'run-mode', |
|
90 | - 'm', |
|
91 | - InputOption::VALUE_OPTIONAL, |
|
92 | - 'Git hook run mode [php|shell|docker]' |
|
93 | - ) |
|
94 | - ->addOption( |
|
95 | - 'run-exec', |
|
96 | - 'e', |
|
97 | - InputOption::VALUE_OPTIONAL, |
|
98 | - 'The Docker command to start your container e.g. \'docker exec CONTAINER\'' |
|
99 | - ) |
|
100 | - ->addOption( |
|
101 | - 'run-path', |
|
102 | - 'p', |
|
103 | - InputOption::VALUE_OPTIONAL, |
|
104 | - 'The path to the CaptainHook executable \'/usr/bin/captainhook\'' |
|
105 | - ); |
|
63 | + ->setDescription('Install git hooks') |
|
64 | + ->setHelp('This command will install the git hooks to your .git directory') |
|
65 | + ->addArgument( |
|
66 | + 'hook', |
|
67 | + InputArgument::OPTIONAL, |
|
68 | + 'Limit the hook you want to install. By default all hooks get installed.' |
|
69 | + ) |
|
70 | + ->addOption( |
|
71 | + 'force', |
|
72 | + 'f', |
|
73 | + InputOption::VALUE_NONE, |
|
74 | + 'Force install without confirmation' |
|
75 | + ) |
|
76 | + ->addOption( |
|
77 | + 'skip-existing', |
|
78 | + 's', |
|
79 | + InputOption::VALUE_NONE, |
|
80 | + 'Do not overwrite existing hooks' |
|
81 | + ) |
|
82 | + ->addOption( |
|
83 | + 'bootstrap', |
|
84 | + 'b', |
|
85 | + InputOption::VALUE_OPTIONAL, |
|
86 | + 'Path to composers vendor/autoload.php' |
|
87 | + ) |
|
88 | + ->addOption( |
|
89 | + 'run-mode', |
|
90 | + 'm', |
|
91 | + InputOption::VALUE_OPTIONAL, |
|
92 | + 'Git hook run mode [php|shell|docker]' |
|
93 | + ) |
|
94 | + ->addOption( |
|
95 | + 'run-exec', |
|
96 | + 'e', |
|
97 | + InputOption::VALUE_OPTIONAL, |
|
98 | + 'The Docker command to start your container e.g. \'docker exec CONTAINER\'' |
|
99 | + ) |
|
100 | + ->addOption( |
|
101 | + 'run-path', |
|
102 | + 'p', |
|
103 | + InputOption::VALUE_OPTIONAL, |
|
104 | + 'The path to the CaptainHook executable \'/usr/bin/captainhook\'' |
|
105 | + ); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -129,9 +129,9 @@ discard block |
||
129 | 129 | $template = Template\Builder::build($config, $repo, $this->executable, $this->resolver->isPharRelease()); |
130 | 130 | $installer = new Installer($io, $config, $repo, $template); |
131 | 131 | $installer->setForce(IOUtil::argToBool($input->getOption('force'))) |
132 | - ->setSkipExisting(IOUtil::argToBool($input->getOption('skip-existing'))) |
|
133 | - ->setHook(IOUtil::argToString($input->getArgument('hook'))) |
|
134 | - ->run(); |
|
132 | + ->setSkipExisting(IOUtil::argToBool($input->getOption('skip-existing'))) |
|
133 | + ->setHook(IOUtil::argToString($input->getArgument('hook'))) |
|
134 | + ->run(); |
|
135 | 135 | |
136 | 136 | return 0; |
137 | 137 | } |
@@ -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'); |