Passed
Push — main ( 13f864...bb3ddf )
by Sebastian
03:50
created
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/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/Config/Setup/Express.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         );
82 82
 
83 83
         if (IOUtil::answerToBool($answer)) {
84
-            $call    = '\\CaptainHook' . '\\App' . '\\Hook\\PHP\\Action\\Linting';
84
+            $call = '\\CaptainHook' . '\\App' . '\\Hook\\PHP\\Action\\Linting';
85 85
             $config->addAction(new Config\Action($call));
86 86
         }
87 87
     }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         );
125 125
 
126 126
         if (IOUtil::answerToBool($answer)) {
127
-            $call    = $this->io->ask(
127
+            $call = $this->io->ask(
128 128
                 '  <info>Enter the phpcs command you want to execute.</info> '
129 129
                 . '<comment>[phpcs --standard=psr2 src]</comment> ',
130 130
                 'phpcs --standard=psr2 src'
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
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
 
110 110
         $executableInclude = substr($executablePath, 0, 1) == '/'
111 111
                            ? '\'' . $executablePath . '\''
112
-                           : '__DIR__ . \'/../../' . $executablePath  . '\'';
112
+                           : '__DIR__ . \'/../../' . $executablePath . '\'';
113 113
 
114 114
         $bootstrapOption       = $this->getBootstrapCmdOption();
115 115
         $bootstrapOptionQuoted = empty($bootstrapOption) ? '' : '            \'' . $bootstrapOption . '\',';
Please login to merge, or discard this patch.
src/Runner/Config/Reader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     {
64 64
         $arg = new Arg(
65 65
             $hook,
66
-            static function (string $hook): bool {
66
+            static function(string $hook): bool {
67 67
                 return !HookUtil::isValid($hook);
68 68
             }
69 69
         );
Please login to merge, or discard this patch.
src/Runner/Files.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     {
85 85
         $arg = new Arg(
86 86
             $hook,
87
-            static function (string $hook): bool {
87
+            static function(string $hook): bool {
88 88
                 return !HookUtil::isInstallable($hook);
89 89
             }
90 90
         );
Please login to merge, or discard this patch.
src/Storage/File/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * @param  bool $assoc
32 32
      * @return \stdClass|array<string, mixed>|null
33 33
      */
34
-    public function read(bool $assoc = false): array|stdClass|null
34
+    public function read(bool $assoc = false): array | stdClass | null
35 35
     {
36 36
         $json = json_decode(parent::read(), $assoc);
37 37
         if (json_last_error() !== JSON_ERROR_NONE) {
Please login to merge, or discard this patch.
src/Hook/Message/Action/InjectIssueKeyFromBranch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
     {
163 163
         $issueID = preg_replace_callback(
164 164
             '/\$(\d+)/',
165
-            function ($matches) use ($issueID) {
165
+            function($matches) use ($issueID) {
166 166
                 return $matches[1] === '1' ? $issueID : '';
167 167
             },
168 168
             $pattern
Please login to merge, or discard this patch.
src/Plugin/Hook/PreserveWorkingTree.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $this->io->write('<info>Unstaged intent-to-add files detected.</info>');
121 121
 
122 122
         $this->repository->getIndexOperator()->removeFiles(
123
-            array_map(function (Path $path): string {
123
+            array_map(function(Path $path): string {
124 124
                 return $path->getPath();
125 125
             }, $this->intentToAddFiles),
126 126
             false,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         }
142 142
 
143 143
         $this->repository->getIndexOperator()->recordIntentToAddFiles(
144
-            array_map(function (Path $path): string {
144
+            array_map(function(Path $path): string {
145 145
                 return $path->getPath();
146 146
             }, $this->intentToAddFiles)
147 147
         );
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
             // At this point, the working tree should be pristine, so the
203 203
             // patch should cleanly apply.
204
-            $this->applyPatch((string)$this->unstagedPatchFile);
204
+            $this->applyPatch((string) $this->unstagedPatchFile);
205 205
         }
206 206
 
207 207
         $this->io->write("<info>Restored changes from {$this->unstagedPatchFile}.</info>");
Please login to merge, or discard this patch.