Passed
Push — master ( a13ab8...ac8496 )
by Sebastian
01:35
created
tests/CaptainHook/Composer/CmdTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             $this->markTestSkipped('not tested on windows');
60 60
         }
61 61
 
62
-        $repo  = new DummyRepo();
62
+        $repo = new DummyRepo();
63 63
         $repo->setup();
64 64
 
65 65
         mkdir($repo->getPath() . DIRECTORY_SEPARATOR . 'vendor');
Please login to merge, or discard this patch.
src/Console/IO/DefaultIO.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
      */
89 89
     public function getArgument(string $name, string $default = '') : string
90 90
     {
91
-        return (string)($this->getArguments()[$name] ?? $default);
91
+        return (string) ($this->getArguments()[$name] ?? $default);
92 92
     }
93 93
 
94 94
     /**
Please login to merge, or discard this patch.
src/Console/Application/Hook.php 1 patch
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.
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/Storage/Util.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      */
40 40
     public static function arrayToPath(array $path, bool $absolute = false) : string
41 41
     {
42
-        return ( $absolute ? DIRECTORY_SEPARATOR : '' ) . implode(DIRECTORY_SEPARATOR, $path);
42
+        return ($absolute ? DIRECTORY_SEPARATOR : '') . implode(DIRECTORY_SEPARATOR, $path);
43 43
     }
44 44
 
45 45
     /**
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.