Passed
Pull Request — master (#103)
by Sebastian
02:29
created
src/Console/IO/DefaultIO.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
      */
91 91
     public function getArgument(string $name, string $default = ''): string
92 92
     {
93
-        return (string)($this->getArguments()[$name] ?? $default);
93
+        return (string) ($this->getArguments()[$name] ?? $default);
94 94
     }
95 95
 
96 96
     /**
Please login to merge, or discard this patch.
src/Console/Command/Add.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('add')
39
-             ->setDescription('Add an action to a hook configuration')
40
-             ->setHelp('This command will add an action configuration to a given hook configuration')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
39
+                ->setDescription('Add an action to a hook configuration')
40
+                ->setHelp('This command will add an action configuration to a given hook configuration')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
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('AddAction')
61
-               ->run();
60
+                ->setChange('AddAction')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
Please login to merge, or discard this patch.
src/Console/Command/Disable.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('disable')
39
-             ->setDescription('Disable a hook execution')
40
-             ->setHelp('This command will disable a hook configuration for a given hook')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
39
+                ->setDescription('Disable a hook execution')
40
+                ->setHelp('This command will disable a hook configuration for a given hook')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
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('DisableHook')
61
-               ->run();
60
+                ->setChange('DisableHook')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
Please login to merge, or discard this patch.
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.
src/Runner/Hook/PrepareCommitMsg.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@
 block discarded – undo
67 67
     public function beforeHook(): void
68 68
     {
69 69
         $this->commentChar = $this->repository->getConfigOperator()->getSafely('core.commentchar', '#');
70
-        $this->file        = (string)$this->io->getArgument('file');
71
-        $this->mode        = (string)$this->io->getArgument('mode');
72
-        $this->hash        = (string)$this->io->getArgument('hash');
70
+        $this->file        = (string) $this->io->getArgument('file');
71
+        $this->mode        = (string) $this->io->getArgument('mode');
72
+        $this->hash        = (string) $this->io->getArgument('hash');
73 73
 
74 74
         if (empty($this->file)) {
75 75
             throw new RuntimeException('commit message file argument is missing');
Please login to merge, or discard this patch.
tests/CaptainHook/Console/IO/NullIOTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
             true,
111 111
             $io->askAndValidate(
112 112
                 'foo',
113
-                function () {
113
+                function() {
114 114
                     return true;
115 115
                 },
116 116
                 false,
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/Runner/Config/Setup/ExpressTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.