Passed
Push — master ( eba56b...0dd639 )
by Sebastian
01:52
created
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.
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.
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->executablePath(), $this->resolver->isPharRelease());
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.
src/Console/Command/Configuration.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.