Passed
Push — master ( 733e51...d67e24 )
by Sebastian
02:01
created
src/Console/Command/Install.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -41,49 +41,49 @@  discard block
 block discarded – undo
41 41
     {
42 42
         parent::configure();
43 43
         $this->setName('install')
44
-             ->setDescription('Install git hooks')
45
-             ->setHelp('This command will install the git hooks to your .git directory')
46
-             ->addArgument(
47
-                 'hook',
48
-                 InputArgument::OPTIONAL,
49
-                 'Limit the hook you want to install. By default all hooks get installed.'
50
-             )
51
-             ->addOption(
52
-                 'force',
53
-                 'f',
54
-                 InputOption::VALUE_NONE,
55
-                 'Force install without confirmation'
56
-             )
57
-             ->addOption(
58
-                 'skip-existing',
59
-                 's',
60
-                 InputOption::VALUE_NONE,
61
-                 'Do not overwrite existing hooks'
62
-             )
63
-             ->addOption(
64
-                 'bootstrap',
65
-                 'b',
66
-                 InputOption::VALUE_OPTIONAL,
67
-                 'Path to composers vendor/autoload.php'
68
-             )
69
-             ->addOption(
70
-                 'run-mode',
71
-                 'm',
72
-                 InputOption::VALUE_OPTIONAL,
73
-                 'Git hook run mode [php|shell|docker]'
74
-             )
75
-             ->addOption(
76
-                 'run-exec',
77
-                 'e',
78
-                 InputOption::VALUE_OPTIONAL,
79
-                 'The Docker command to start your container e.g. \'docker exec CONTAINER\''
80
-             )
81
-             ->addOption(
82
-                 'run-path',
83
-                 'p',
84
-                 InputOption::VALUE_OPTIONAL,
85
-                 'The path to the CaptainHook executable \'/usr/bin/captainhook\''
86
-             );
44
+                ->setDescription('Install git hooks')
45
+                ->setHelp('This command will install the git hooks to your .git directory')
46
+                ->addArgument(
47
+                    'hook',
48
+                    InputArgument::OPTIONAL,
49
+                    'Limit the hook you want to install. By default all hooks get installed.'
50
+                )
51
+                ->addOption(
52
+                    'force',
53
+                    'f',
54
+                    InputOption::VALUE_NONE,
55
+                    'Force install without confirmation'
56
+                )
57
+                ->addOption(
58
+                    'skip-existing',
59
+                    's',
60
+                    InputOption::VALUE_NONE,
61
+                    'Do not overwrite existing hooks'
62
+                )
63
+                ->addOption(
64
+                    'bootstrap',
65
+                    'b',
66
+                    InputOption::VALUE_OPTIONAL,
67
+                    'Path to composers vendor/autoload.php'
68
+                )
69
+                ->addOption(
70
+                    'run-mode',
71
+                    'm',
72
+                    InputOption::VALUE_OPTIONAL,
73
+                    'Git hook run mode [php|shell|docker]'
74
+                )
75
+                ->addOption(
76
+                    'run-exec',
77
+                    'e',
78
+                    InputOption::VALUE_OPTIONAL,
79
+                    'The Docker command to start your container e.g. \'docker exec CONTAINER\''
80
+                )
81
+                ->addOption(
82
+                    'run-path',
83
+                    'p',
84
+                    InputOption::VALUE_OPTIONAL,
85
+                    'The path to the CaptainHook executable \'/usr/bin/captainhook\''
86
+                );
87 87
     }
88 88
 
89 89
     /**
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
         $template  = Template\Builder::build($config, $repo, $this->resolver);
111 111
         $installer = new Installer($io, $config, $repo, $template);
112 112
         $installer->setForce(IOUtil::argToBool($input->getOption('force')))
113
-                  ->setSkipExisting(IOUtil::argToBool($input->getOption('skip-existing')))
114
-                  ->setHook(IOUtil::argToString($input->getArgument('hook')))
115
-                  ->run();
113
+                    ->setSkipExisting(IOUtil::argToBool($input->getOption('skip-existing')))
114
+                    ->setHook(IOUtil::argToString($input->getArgument('hook')))
115
+                    ->run();
116 116
 
117 117
         return 0;
118 118
     }
Please login to merge, or discard this patch.
tests/CaptainHook/Mockery.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
     public function createResolverMock(string $executable = 'vendor/bin/captainhook', bool $isPhar = false): Resolver
30 30
     {
31 31
         $repo = $this->getMockBuilder(Resolver::class)
32
-                     ->disableOriginalConstructor()
33
-                     ->getMock();
32
+                        ->disableOriginalConstructor()
33
+                        ->getMock();
34 34
 
35 35
         $repo->method('getExecutable')->willReturn($executable);
36 36
         $repo->method('isPharRelease')->willReturn($isPhar);
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
     public function createRepositoryMock(string $root = ''): Repository
48 48
     {
49 49
         $repo = $this->getMockBuilder(Repository::class)
50
-                     ->disableOriginalConstructor()
51
-                     ->getMock();
50
+                        ->disableOriginalConstructor()
51
+                        ->getMock();
52 52
 
53 53
         $repo->method('getRoot')->willReturn($root);
54 54
         $repo->method('getHooksDir')->willReturn($root . '/.git/hooks');
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
     public function createGitInfoOperator(string $tag = 'v1.0.0'): Info
66 66
     {
67 67
         $operator = $this->getMockBuilder(Info::class)
68
-                         ->disableOriginalConstructor()
69
-                         ->getMock();
68
+                            ->disableOriginalConstructor()
69
+                            ->getMock();
70 70
 
71 71
         $operator->method('getCurrentTag')->willReturn($tag);
72 72
 
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     public function createGitDiffOperator(array $changedFiles = []): Diff
83 83
     {
84 84
         $operator = $this->getMockBuilder(Diff::class)
85
-                         ->disableOriginalConstructor()
86
-                         ->getMock();
85
+                            ->disableOriginalConstructor()
86
+                            ->getMock();
87 87
 
88 88
         $operator->method('getChangedFiles')->willReturn($changedFiles);
89 89
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
     public function createGitIndexOperator(array $stagedFiles = []): Index
100 100
     {
101 101
         $operator = $this->getMockBuilder(Index::class)
102
-                         ->disableOriginalConstructor()
103
-                         ->getMock();
102
+                            ->disableOriginalConstructor()
103
+                            ->getMock();
104 104
 
105 105
         $operator->method('getStagedFiles')->willReturn($stagedFiles);
106 106
 
Please login to merge, or discard this patch.
tests/CaptainHook/Console/ApplicationTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $input = new ArrayInput(['--version' => true]);
28 28
         $output = $this->getMockBuilder(NullOutput::class)
29
-                       ->disableOriginalConstructor()
30
-                       ->getMock();
29
+                        ->disableOriginalConstructor()
30
+                        ->getMock();
31 31
 
32 32
         $output->expects($this->once())->method('writeLn');
33 33
 
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $input = new ArrayInput(['command' => 'list']);
48 48
         $output = $this->getMockBuilder(NullOutput::class)
49
-                       ->disableOriginalConstructor()
50
-                       ->getMock();
49
+                        ->disableOriginalConstructor()
50
+                        ->getMock();
51 51
 
52 52
         $output->expects($this->atLeastOnce())->method('write');
53 53
 
Please login to merge, or discard this patch.