Passed
Push — main ( 36f773...e1b064 )
by Sebastian
03:34
created
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 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,9 +142,9 @@
 block discarded – undo
142 142
 
143 143
         // combine all the parts to create a new commit message
144 144
         $msgText = $msgData[self::TARGET_SUBJECT] . PHP_EOL
145
-                 . PHP_EOL
146
-                 . $msgData[self::TARGET_BODY] . PHP_EOL
147
-                 . $msg->getComments();
145
+                    . PHP_EOL
146
+                    . $msgData[self::TARGET_BODY] . PHP_EOL
147
+                    . $msg->getComments();
148 148
 
149 149
         return new CommitMessage($msgText, $msg->getCommentCharacter());
150 150
     }
Please login to merge, or discard this 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.
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 a 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.
src/Storage/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,6 +140,6 @@
 block discarded – undo
140 140
         if (!$this->isLink()) {
141 141
             throw new RuntimeException('Not a symbolic link: ' . $this->path);
142 142
         }
143
-        return (string)readlink($this->path);
143
+        return (string) readlink($this->path);
144 144
     }
145 145
 }
Please login to merge, or discard this patch.
tests/unit/Runner/InstallerTest.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
         $template = $this->createTemplateMock();
163 163
 
164 164
         $template->expects($this->once())
165
-                 ->method('getCode')
166
-                 ->with('pre-commit')
167
-                 ->willReturn('');
165
+                    ->method('getCode')
166
+                    ->with('pre-commit')
167
+                    ->willReturn('');
168 168
 
169 169
         $runner = new Installer($io, $config, $repo, $template);
170 170
         $runner->setHook('pre-commit');
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
         $template = $this->createTemplateMock();
185 185
 
186 186
         $file = $this->getMockBuilder(File::class)
187
-                     ->disableOriginalConstructor()
188
-                     ->getMock();
187
+                        ->disableOriginalConstructor()
188
+                        ->getMock();
189 189
 
190 190
         $runner = new FakeInstaller($io, $config, $repo, $template);
191 191
         $file->method('isLink')->willReturn(true);
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
         $template = $this->createTemplateMock();
209 209
 
210 210
         $file = $this->getMockBuilder(File::class)
211
-                     ->disableOriginalConstructor()
212
-                     ->getMock();
211
+                        ->disableOriginalConstructor()
212
+                        ->getMock();
213 213
 
214 214
         $runner = new FakeInstaller($io, $config, $repo, $template);
215 215
         $file->method('isLink')->willReturn(true);
@@ -265,14 +265,14 @@  discard block
 block discarded – undo
265 265
         $repo     = new Repository($fakeRepo->getRoot());
266 266
 
267 267
         $template->expects($this->once())
268
-                 ->method('getCode')
269
-                 ->with('pre-commit')
270
-                 ->willReturn('');
268
+                    ->method('getCode')
269
+                    ->with('pre-commit')
270
+                    ->willReturn('');
271 271
 
272 272
         $runner = new Installer($io, $config, $repo, $template);
273 273
         $runner->setHook('pre-commit')
274
-               ->setMoveExistingTo('foo/bar/')
275
-               ->run();
274
+                ->setMoveExistingTo('foo/bar/')
275
+                ->run();
276 276
 
277 277
         $this->assertFileExists($fakeRepo->getHookDir() . '/pre-commit');
278 278
         $this->assertFileExists($fakeRepo->getRoot() . '/foo/bar/pre-commit');
@@ -303,14 +303,14 @@  discard block
 block discarded – undo
303 303
         $repo     = new Repository($fakeRepo->getRoot());
304 304
 
305 305
         $template->expects($this->once())
306
-                 ->method('getCode')
307
-                 ->with('pre-commit')
308
-                 ->willReturn('');
306
+                    ->method('getCode')
307
+                    ->with('pre-commit')
308
+                    ->willReturn('');
309 309
 
310 310
         $runner = new Installer($io, $config, $repo, $template);
311 311
         $runner->setHook('pre-commit')
312
-               ->setMoveExistingTo('foo/bar/')
313
-               ->run();
312
+                ->setMoveExistingTo('foo/bar/')
313
+                ->run();
314 314
 
315 315
         $this->assertFileExists($fakeRepo->getHookDir() . '/pre-commit');
316 316
     }
@@ -344,8 +344,8 @@  discard block
 block discarded – undo
344 344
 
345 345
         $runner = new Installer($io, $config, $repo, $template);
346 346
         $runner->setHook('pre-commit')
347
-               ->setMoveExistingTo('foo')
348
-               ->run();
347
+                ->setMoveExistingTo('foo')
348
+                ->run();
349 349
     }
350 350
 
351 351
     /**
Please login to merge, or discard this patch.