Passed
Push — master ( a5b7b1...ebf6a9 )
by Sebastian
02:18
created
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.
src/Hook/Composer/Action/CheckLockFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         }
110 110
         ksort($relevantContent);
111 111
 
112
-        return md5((string)json_encode($relevantContent));
112
+        return md5((string) json_encode($relevantContent));
113 113
     }
114 114
 
115 115
     /**
@@ -124,6 +124,6 @@  discard block
 block discarded – undo
124 124
         if (!file_exists($file)) {
125 125
             throw new \Exception($file . ' not found');
126 126
         }
127
-        return (string)file_get_contents($file);
127
+        return (string) file_get_contents($file);
128 128
     }
129 129
 }
Please login to merge, or discard this patch.
tests/CaptainHook/Console/Command/DisableTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         $this->expectException(\Exception::class);
26 26
 
27
-        $input   = new ArrayInput(
27
+        $input = new ArrayInput(
28 28
             [
29 29
                 'hook' => 'pre-commit',
30 30
                 '--configuration' => 'foo'
Please login to merge, or discard this patch.
tests/CaptainHook/Console/Command/AddTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         $this->expectException(\Exception::class);
26 26
 
27
-        $input   = new ArrayInput(
27
+        $input = new ArrayInput(
28 28
             [
29 29
                 'hook' => 'pre-commit',
30 30
                 '--configuration' => 'foo'
Please login to merge, or discard this patch.