Passed
Push — main ( 9730cc...08d90e )
by Sebastian
04:04
created
src/Hook/Condition/FileStaged/ThatIs.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function __construct(array $options)
71 71
     {
72
-        $this->directories = (array)($options['inDirectory'] ?? []);
73
-        $this->suffixes    = (array)($options['ofType'] ?? []);
72
+        $this->directories = (array) ($options['inDirectory'] ?? []);
73
+        $this->suffixes    = (array) ($options['ofType'] ?? []);
74 74
 
75 75
         $diffFilter = $options['diffFilter'] ?? [];
76 76
         $this->diffFilter  = FilterUtil::sanitize(is_array($diffFilter) ? $diffFilter : str_split($diffFilter));
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if (empty($this->directories)) {
113 113
             return $files;
114 114
         }
115
-        return array_filter($files, function ($file) {
115
+        return array_filter($files, function($file) {
116 116
             foreach ($this->directories as $directory) {
117 117
                 if (str_starts_with($file, $directory)) {
118 118
                     return true;
Please login to merge, or discard this patch.
src/Hook/Condition/Logic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     {
49 49
         $realConditions = [];
50 50
         foreach ($conditions as $condition) {
51
-            if (! $condition instanceof Condition) {
51
+            if (!$condition instanceof Condition) {
52 52
                 continue;
53 53
             }
54 54
             $realConditions[] = $condition;
Please login to merge, or discard this patch.
src/Hook/File/Action/DoesNotContainRegex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
                . 'found ' . $this->totalMatches . ' match'
140 140
                . ($this->totalMatches > 1 ? 'es' : '')
141 141
                . ' in ' . $filesFailed . ' file'
142
-               . ($filesFailed > 1 ? 's' : '' );
142
+               . ($filesFailed > 1 ? 's' : '');
143 143
     }
144 144
 
145 145
     /**
Please login to merge, or discard this patch.
src/Git/ChangedFiles/Detector/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $command = $io->getArgument(Hooks::ARG_COMMAND);
51 51
 
52 52
         /** @var \CaptainHook\App\Git\ChangedFiles\Detecting $class */
53
-        $class    = self::$detectors[$command] ?? '\\CaptainHook\\App\\Git\\ChangedFiles\\Detector\\Fallback';
53
+        $class = self::$detectors[$command] ?? '\\CaptainHook\\App\\Git\\ChangedFiles\\Detector\\Fallback';
54 54
         return new $class($io, $repository);
55 55
     }
56 56
 }
Please login to merge, or discard this patch.
src/Hook/Template/Local/PHP.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
 
111 111
         $executableInclude = substr($executablePath, 0, 1) == '/'
112 112
                            ? '\'' . $executablePath . '\''
113
-                           : '__DIR__ . \'/../../' . $executablePath  . '\'';
113
+                           : '__DIR__ . \'/../../' . $executablePath . '\'';
114 114
         return array_merge(
115 115
             [
116 116
                 '#!/usr/bin/env php',
Please login to merge, or discard this patch.
src/Hook/UserInput/EventHandler/AskConfirmation.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
      */
60 60
     public function handle(Event $event): void
61 61
     {
62
-        if (!IOUtil::answerToBool($event->io()->ask(PHP_EOL .  $this->question . ' ', $this->default ? 'y' : 'n'))) {
62
+        if (!IOUtil::answerToBool($event->io()->ask(PHP_EOL . $this->question . ' ', $this->default ? 'y' : 'n'))) {
63 63
             throw new ActionFailed('no confirmation, abort!');
64 64
         }
65 65
     }
Please login to merge, or discard this patch.
tests/unit/Console/IO/DefaultIOTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
         $io     = new DefaultIO($input, $output, $helper);
233 233
         $answer = $io->askAndValidate(
234 234
             'foo',
235
-            function () {
235
+            function() {
236 236
                 return true;
237 237
             }
238 238
         );
Please login to merge, or discard this patch.
tests/unit/Runner/UninstallerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
         $repo     = new Repository($fakeRepo->getRoot());
167 167
 
168 168
         $config->method('isHookEnabled')->willReturnCallback(
169
-            function (string $hook): bool {
169
+            function(string $hook): bool {
170 170
                 return $hook === 'pre-push';
171 171
             }
172 172
         );
Please login to merge, or discard this patch.
src/Runner/Installer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
228 228
         // if hook is configured and no force option is set
229 229
         // ask the user if overwriting the hook is ok
230 230
         if ($this->needConfirmation($hook)) {
231
-            $ans  = $this->io->ask(
231
+            $ans = $this->io->ask(
232 232
                 'The <comment>' . $hook . '</comment> hook exists! Overwrite? <comment>[y,N]</comment> ',
233 233
                 'n'
234 234
             );
Please login to merge, or discard this patch.