Passed
Push — master ( b7f91d...487e91 )
by Sebastian
02:08
created
src/Hook/Composer/Action/CheckLockFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         }
113 113
         ksort($relevantContent);
114 114
 
115
-        return md5((string)json_encode($relevantContent));
115
+        return md5((string) json_encode($relevantContent));
116 116
     }
117 117
 
118 118
     /**
@@ -127,6 +127,6 @@  discard block
 block discarded – undo
127 127
         if (!file_exists($file)) {
128 128
             throw new Exception($file . ' not found');
129 129
         }
130
-        return (string)file_get_contents($file);
130
+        return (string) file_get_contents($file);
131 131
     }
132 132
 }
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
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
      */
91 91
     public function getArgument(string $name, string $default = ''): string
92 92
     {
93
-        return (string)($this->getArguments()[$name] ?? $default);
93
+        return (string) ($this->getArguments()[$name] ?? $default);
94 94
     }
95 95
 
96 96
     /**
Please login to merge, or discard this patch.
src/Console/Command/Add.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('add')
39
-             ->setDescription('Add an action to a hook configuration')
40
-             ->setHelp('This command will add an action configuration to a given hook configuration')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
39
+                ->setDescription('Add an action to a hook configuration')
40
+                ->setHelp('This command will add an action configuration to a given hook configuration')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
42 42
     }
43 43
 
44 44
     /**
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
         $editor = new Editor($io, $config);
59 59
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
60
-               ->setChange('AddAction')
61
-               ->run();
60
+                ->setChange('AddAction')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
Please login to merge, or discard this patch.
src/Console/Command/Disable.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('disable')
39
-             ->setDescription('Disable a hook execution')
40
-             ->setHelp('This command will disable a hook configuration for a given hook')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
39
+                ->setDescription('Disable a hook execution')
40
+                ->setHelp('This command will disable a hook configuration for a given hook')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
42 42
     }
43 43
 
44 44
     /**
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
         $editor = new Editor($io, $config);
59 59
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
60
-               ->setChange('DisableHook')
61
-               ->run();
60
+                ->setChange('DisableHook')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
Please login to merge, or discard this patch.
src/Console/Command/Hook.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
     {
47 47
         parent::configure();
48 48
         $this->setName('hook:' . $this->hookName)
49
-             ->setDescription('Run git ' . $this->hookName . ' hook.')
50
-             ->setHelp('This command executes the ' . $this->hookName . ' hook.');
49
+                ->setDescription('Run git ' . $this->hookName . ' hook.')
50
+                ->setHelp('This command executes the ' . $this->hookName . ' hook.');
51 51
 
52 52
         $this->addOption(
53 53
             'bootstrap',
Please login to merge, or discard this patch.
src/Console/Command/Enable.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('enable')
39
-             ->setDescription('Enable a hook execution')
40
-             ->setHelp('This command will enable a hook configuration for a given hook')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to enable');
39
+                ->setDescription('Enable a hook execution')
40
+                ->setHelp('This command will enable a hook configuration for a given hook')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to enable');
42 42
     }
43 43
 
44 44
     /**
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
         $editor = new Editor($io, $config);
59 59
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
60
-               ->setChange('EnableHook')
61
-               ->run();
60
+                ->setChange('EnableHook')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
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
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
         ob_start();
80 80
         $class::$method();
81
-        return (string)ob_get_clean();
81
+        return (string) ob_get_clean();
82 82
     }
83 83
 
84 84
     /**
@@ -107,6 +107,6 @@  discard block
 block discarded – undo
107 107
      */
108 108
     protected function isStaticMethodCall(string $class): bool
109 109
     {
110
-        return (bool)preg_match('#^\\\\.+::.+$#i', $class);
110
+        return (bool) preg_match('#^\\\\.+::.+$#i', $class);
111 111
     }
112 112
 }
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
@@ -67,9 +67,9 @@
 block discarded – undo
67 67
     public function beforeHook(): void
68 68
     {
69 69
         $this->commentChar = $this->repository->getConfigOperator()->getSafely('core.commentchar', '#');
70
-        $this->file        = (string)$this->io->getArgument('file');
71
-        $this->mode        = (string)$this->io->getArgument('mode');
72
-        $this->hash        = (string)$this->io->getArgument('hash');
70
+        $this->file        = (string) $this->io->getArgument('file');
71
+        $this->mode        = (string) $this->io->getArgument('mode');
72
+        $this->hash        = (string) $this->io->getArgument('hash');
73 73
 
74 74
         if (empty($this->file)) {
75 75
             throw new RuntimeException('commit message file argument is missing');
Please login to merge, or discard this patch.
tests/CaptainHook/Composer/CmdTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $composer = $this->createComposerMock($extra);
130 130
         $event    = $this->getMockBuilder(Event::class)
131
-                         ->disableOriginalConstructor()
132
-                         ->getMock();
131
+                            ->disableOriginalConstructor()
132
+                            ->getMock();
133 133
 
134 134
         $event->expects($this->once())->method('getIO')->willReturn(new NullIO());
135 135
         $event->expects($this->once())->method('getComposer')->willReturn($composer);
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
         $package->expects($this->atLeast(1))->method('getExtra')->willReturn($extra);
152 152
 
153 153
         $composer = $this->getMockBuilder(Composer::class)
154
-                         ->disableOriginalConstructor()
155
-                         ->getMock();
154
+                            ->disableOriginalConstructor()
155
+                            ->getMock();
156 156
         $composer->expects($this->atLeast(1))->method('getPackage')->willReturn($package);
157 157
 
158 158
         return $composer;
Please login to merge, or discard this patch.