Passed
Push — master ( 0e2829...b89ee9 )
by Sebastian
03:53 queued 01:21
created
src/Console/Command/Hook.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@
 block discarded – undo
68 68
     protected function configure() : void
69 69
     {
70 70
         $this->setName($this->name)
71
-             ->setDescription('Run git ' . $this->name . ' hook.')
72
-             ->setHelp('This command executes the ' . $this->name . ' hook.');
71
+                ->setDescription('Run git ' . $this->name . ' hook.')
72
+                ->setHelp('This command executes the ' . $this->name . ' hook.');
73 73
     }
74 74
 
75 75
     /**
Please login to merge, or discard this patch.
src/Console/Command/Add.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,16 +35,16 @@  discard block
 block discarded – undo
35 35
     protected function configure() : void
36 36
     {
37 37
         $this->setName('add')
38
-             ->setDescription('Add an action to a hook configuration')
39
-             ->setHelp('This command will add an action configuration to a given hook configuration')
40
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to')
41
-             ->addOption(
42
-                 'configuration',
43
-                 'c',
44
-                 InputOption::VALUE_OPTIONAL,
45
-                 'Path to your json configuration',
46
-                 getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG
47
-             );
38
+                ->setDescription('Add an action to a hook configuration')
39
+                ->setHelp('This command will add an action configuration to a given hook configuration')
40
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to')
41
+                ->addOption(
42
+                    'configuration',
43
+                    'c',
44
+                    InputOption::VALUE_OPTIONAL,
45
+                    'Path to your json configuration',
46
+                    getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG
47
+                );
48 48
     }
49 49
 
50 50
     /**
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 
63 63
         $editor = new Editor($io, $config);
64 64
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
65
-               ->setChange('AddAction')
66
-               ->run();
65
+                ->setChange('AddAction')
66
+                ->run();
67 67
 
68 68
         return 0;
69 69
     }
Please login to merge, or discard this patch.
src/Console/Application/Hook.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      *
39 39
      * @var string
40 40
      */
41
-    protected $hookToExecute  = '';
41
+    protected $hookToExecute = '';
42 42
 
43 43
     /**
44 44
      * Repository path setter
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,8 +150,8 @@
 block discarded – undo
150 150
                 [
151 151
                     '',
152 152
                     IOUtil::getLineSeparator(8)
153
-                      . ' Error details: <comment>Exception</comment> '
154
-                      . IOUtil::getLineSeparator(46),
153
+                        . ' Error details: <comment>Exception</comment> '
154
+                        . IOUtil::getLineSeparator(46),
155 155
                     $e->getMessage(),
156 156
                     ''
157 157
                 ]
Please login to merge, or discard this patch.
src/Runner/Config/Setup/Express.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         );
80 80
 
81 81
         if (IOUtil::answerToBool($answer)) {
82
-            $call    = '\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting';
82
+            $call = '\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting';
83 83
             $config->addAction(new Config\Action($call));
84 84
         }
85 85
     }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         );
123 123
 
124 124
         if (IOUtil::answerToBool($answer)) {
125
-            $call    = $this->io->ask(
125
+            $call = $this->io->ask(
126 126
                 '  <info>Enter the phpcs command you want to execute.</info> '
127 127
                 . '<comment>[phpcs --standard=psr2 src]</comment> ',
128 128
                 'phpcs --standard=psr2 src'
Please login to merge, or discard this patch.
src/Runner/Action/PHP.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         }
76 76
         ob_start();
77 77
         $class::$method();
78
-        return (string)ob_get_clean();
78
+        return (string) ob_get_clean();
79 79
     }
80 80
 
81 81
     /**
@@ -104,6 +104,6 @@  discard block
 block discarded – undo
104 104
      */
105 105
     protected function isStaticMethodCall(string $class) : bool
106 106
     {
107
-        return (bool)preg_match('#^\\\\.+::.+$#i', $class);
107
+        return (bool) preg_match('#^\\\\.+::.+$#i', $class);
108 108
     }
109 109
 }
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
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
     public function beforeHook() : void
66 66
     {
67 67
         $this->commentChar = $this->repository->getConfigOperator()->getSafely('core.commentchar', '#');
68
-        $this->file        = (string)$this->io->getArgument('file');
69
-        $this->mode        = (string)$this->io->getArgument('mode');
70
-        $this->hash        = (string)$this->io->getArgument('hash');
68
+        $this->file        = (string) $this->io->getArgument('file');
69
+        $this->mode        = (string) $this->io->getArgument('mode');
70
+        $this->hash        = (string) $this->io->getArgument('hash');
71 71
 
72 72
         if (empty($this->file)) {
73 73
             throw new \RuntimeException('commit message file argument is missing');
Please login to merge, or discard this patch.
src/Hook/Message/Action/Book.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             'CAPTAINHOOK FOUND ' . $err . ' PROBLEM' . ($err === 1 ? '' : 'S') . ' IN YOUR COMMIT MESSAGE',
81 81
             IOUtil::getLineSeparator(80, '-')
82 82
         ];
83
-        $msg  = OutputUtil::trimEmptyLines($repository->getCommitMsg()->getLines());
83
+        $msg = OutputUtil::trimEmptyLines($repository->getCommitMsg()->getLines());
84 84
 
85 85
         $lines = [IOUtil::getLineSeparator(80, '-')];
86 86
         foreach ($problems as $problem) {
Please login to merge, or discard this patch.
src/Hook/Message/Rule/Blacklist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     {
53 53
         $this->isCaseSensitive = $caseSensitive;
54 54
         $this->hint            = 'Commit message should not contain blacklisted words';
55
-        $this->stringDetection = function (string $content, string $term) : bool {
55
+        $this->stringDetection = function(string $content, string $term) : bool {
56 56
             return strpos($content, $term) !== false;
57 57
         };
58 58
     }
Please login to merge, or discard this patch.
src/Hook/Message/Rule/UseImperativeMood.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
         if ($checkOnlyBeginning) {
45 45
             // overwrite the detection logic to only check the beginning og the string
46
-            $this->stringDetection = function (string $content, string $term) : bool {
46
+            $this->stringDetection = function(string $content, string $term) : bool {
47 47
                 return strpos($content, $term) === 0;
48 48
             };
49 49
         }
Please login to merge, or discard this patch.