Passed
Push — master ( f32c0c...eba56b )
by Sebastian
02:02
created
src/Console/Command/Enable.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('enable')
39
-             ->setDescription('Enable a hook execution')
40
-             ->setHelp('This command will enable a hook configuration for a given hook')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to enable');
39
+                ->setDescription('Enable a hook execution')
40
+                ->setHelp('This command will enable a hook configuration for a given hook')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to enable');
42 42
     }
43 43
 
44 44
     /**
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
         $editor = new Editor($io, $config);
59 59
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
60
-               ->setChange('EnableHook')
61
-               ->run();
60
+                ->setChange('EnableHook')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
Please login to merge, or discard this patch.
tests/CaptainHook/Composer/CmdTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $composer = $this->createComposerMock($extra);
130 130
         $event    = $this->getMockBuilder(Event::class)
131
-                         ->disableOriginalConstructor()
132
-                         ->getMock();
131
+                            ->disableOriginalConstructor()
132
+                            ->getMock();
133 133
 
134 134
         $event->expects($this->once())->method('getIO')->willReturn(new NullIO());
135 135
         $event->expects($this->once())->method('getComposer')->willReturn($composer);
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
         $package->expects($this->atLeast(1))->method('getExtra')->willReturn($extra);
152 152
 
153 153
         $composer = $this->getMockBuilder(Composer::class)
154
-                         ->disableOriginalConstructor()
155
-                         ->getMock();
154
+                            ->disableOriginalConstructor()
155
+                            ->getMock();
156 156
         $composer->expects($this->atLeast(1))->method('getPackage')->willReturn($package);
157 157
 
158 158
         return $composer;
Please login to merge, or discard this patch.
tests/CaptainHook/Console/Application/CliTest.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.
tests/CaptainHook/Runner/Config/EditorTest.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 
39 39
         $runner = new Editor($io, $config);
40 40
         $runner->setHook('foo')
41
-               ->setChange('EnableHook')
42
-               ->run();
41
+                ->setChange('EnableHook')
42
+                ->run();
43 43
     }
44 44
 
45 45
     /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         $runner = new Editor($io, $config);
57 57
         $runner->setChange('EnableHook')
58
-               ->run();
58
+                ->run();
59 59
     }
60 60
 
61 61
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         $runner = new Editor($io, $config);
75 75
         $runner->setHook('pre-commit')
76
-               ->run();
76
+                ->run();
77 77
     }
78 78
 
79 79
     /**
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 
92 92
         $runner = new Editor($io, $config);
93 93
         $runner->setChange('InvalidChange')
94
-               ->setHook('pre-commit')
95
-               ->run();
94
+                ->setHook('pre-commit')
95
+                ->run();
96 96
     }
97 97
 
98 98
     /**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         $runner = new Editor($io, $config);
112 112
         $runner->setChange('EnableHook')
113
-               ->run();
113
+                ->run();
114 114
     }
115 115
 
116 116
     /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         $runner = new Editor($io, $config);
130 130
         $runner->setHook('pre-commit')
131
-               ->run();
131
+                ->run();
132 132
     }
133 133
 
134 134
     /**
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 
147 147
         $runner = new Editor($io, $config);
148 148
         $runner->setChange('AddAction')
149
-               ->setHook('pre-commit')
150
-               ->run();
149
+                ->setHook('pre-commit')
150
+                ->run();
151 151
     }
152 152
 
153 153
     /**
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 
166 166
         $runner = new Creator($io, $config);
167 167
         $runner->extend(true)
168
-               ->advanced(true)
169
-               ->run();
168
+                ->advanced(true)
169
+                ->run();
170 170
 
171 171
         $this->assertFileExists($configDir->url() . '/captainhook.json');
172 172
     }
Please login to merge, or discard this patch.
tests/CaptainHook/Runner/Config/CreatorTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $runner = new Creator($io, $config);
40 40
         $runner->advanced(true)
41
-               ->run();
41
+                ->run();
42 42
     }
43 43
 
44 44
     /**
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 
63 63
         $runner = new Creator($io, $config);
64 64
         $runner->extend(true)
65
-               ->advanced(true)
66
-               ->run();
65
+                ->advanced(true)
66
+                ->run();
67 67
 
68 68
         $configFileContentAfter = $configDir->getChild('captainhook.json')->getContent();
69 69
         $this->assertFileExists($configFile);
Please login to merge, or discard this patch.
tests/CaptainHook/Console/IO/Mockery.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Console/Command/Install.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -60,49 +60,49 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/CaptainHook/Runner/InstallerTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,9 +78,9 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.