Passed
Pull Request — master (#103)
by Sebastian
02:29
created
tests/CaptainHook/Config/Mockery.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
     public function createConfigMock(bool $loadedFromFile = false, string $path = ''): CHConfig
24 24
     {
25 25
         $config = $this->getMockBuilder(CHConfig::class)
26
-                       ->disableOriginalConstructor()
27
-                       ->getMock();
26
+                        ->disableOriginalConstructor()
27
+                        ->getMock();
28 28
 
29 29
         $config->method('isLoadedFromFile')->willReturn($loadedFromFile);
30 30
         $config->method('getPath')->willReturn($path);
Please login to merge, or discard this patch.
tests/CaptainHook/Console/IO/DefaultIOTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
     public function getOutputMock()
47 47
     {
48 48
         return $this->getMockBuilder(OutputInterface::class)
49
-                     ->disableOriginalConstructor()
50
-                     ->getMock();
49
+                        ->disableOriginalConstructor()
50
+                        ->getMock();
51 51
     }
52 52
 
53 53
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
         $io     = new DefaultIO($this->fakeStdIn(), $input, $output, $helper);
248 248
         $answer = $io->askAndValidate(
249 249
             'foo',
250
-            function () {
250
+            function() {
251 251
                 return true;
252 252
             }
253 253
         );
Please login to merge, or discard this patch.
tests/CaptainHook/Console/IO/ComposerIOTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
     public function setUp(): void
19 19
     {
20 20
         $mock = $this->getMockBuilder(IOInterface::class)
21
-                     ->disableOriginalConstructor()
22
-                     ->getMock();
21
+                        ->disableOriginalConstructor()
22
+                        ->getMock();
23 23
         $mock->method('isInteractive')->willReturn(false);
24 24
         $mock->method('isDebug')->willReturn(false);
25 25
         $mock->method('isVerbose')->willReturn(false);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
             true,
127 127
             $this->io->askAndValidate(
128 128
                 'foo',
129
-                function () {
129
+                function() {
130 130
                     return true;
131 131
                 },
132 132
                 null,
Please login to merge, or discard this patch.
tests/CaptainHook/Console/Command/AddTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
55 55
         );
56 56
 
57 57
         $io = $this->getMockBuilder(DefaultIO::class)
58
-                   ->disableOriginalConstructor()
59
-                   ->getMock();
58
+                    ->disableOriginalConstructor()
59
+                    ->getMock();
60 60
 
61 61
         $io->method('ask')->will($this->onConsecutiveCalls('\\Foo\\Bar', 'n'));
62 62
         $io->expects($this->once())->method('write');
Please login to merge, or discard this patch.
tests/CaptainHook/Hook/Message/Action/RegexTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $io     = new NullIO();
79 79
         $config = new Config(CH_PATH_FILES . '/captainhook.json');
80
-        $repo    = $this->createRepositoryMock();
80
+        $repo = $this->createRepositoryMock();
81 81
         $action = new Config\Action(Regex::class);
82 82
 
83 83
         $standard = new Regex();
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 'error' => 'No match for %s'
120 120
             ]
121 121
         );
122
-        $repo   = $this->createRepositoryMock();
122
+        $repo = $this->createRepositoryMock();
123 123
         $repo->expects($this->once())->method('getCommitMsg')->willReturn(new CommitMessage('Foo bar baz'));
124 124
 
125 125
         $standard = new Regex();
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.
tests/CaptainHook/Console/Command/DisableTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
55 55
         );
56 56
 
57 57
         $io = $this->getMockBuilder(DefaultIO::class)
58
-                   ->disableOriginalConstructor()
59
-                   ->getMock();
58
+                    ->disableOriginalConstructor()
59
+                    ->getMock();
60 60
         $io->expects($this->once())->method('write');
61 61
 
62 62
         $add->setIO($io);
Please login to merge, or discard this 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
         );
41 41
 
42
-        $install  = new Disable($resolver);
42
+        $install = new Disable($resolver);
43 43
         $install->setIO(new NullIO());
44 44
         $install->run($input, $output);
45 45
     }
Please login to merge, or discard this patch.
src/Hook/Message/Rule/UseImperativeMood.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
         if ($checkOnlyBeginning) {
47 47
             // overwrite the detection logic to only check the beginning og the string
48
-            $this->stringDetection = function (string $content, string $term): bool {
48
+            $this->stringDetection = function(string $content, string $term): bool {
49 49
                 return strpos($content, $term) === 0;
50 50
             };
51 51
         }
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
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     {
55 55
         $this->isCaseSensitive = $caseSensitive;
56 56
         $this->hint            = 'Commit message should not contain blacklisted words';
57
-        $this->stringDetection = function (string $content, string $term): bool {
57
+        $this->stringDetection = function(string $content, string $term): bool {
58 58
             return strpos($content, $term) !== false;
59 59
         };
60 60
     }
Please login to merge, or discard this patch.