Passed
Push — master ( 363b1d...17e970 )
by Sebastian
02:50
created
tests/CaptainHook/Hook/File/Action/DoesNotContainRegexTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         $io     = new NullIO();
35 35
         $config = new Config(CH_PATH_FILES . '/captainhook.json');
36
-        $repo    = $this->createRepositoryMock();
36
+        $repo = $this->createRepositoryMock();
37 37
         $action = new Config\Action(DoesNotContainRegex::class);
38 38
 
39 39
         $standard = new DoesNotContainRegex();
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
             'regex' => '#.#',
132 132
             'fileExtensions' => ['php']
133 133
         ]);
134
-        $index  = $this->createGitIndexOperator([
134
+        $index = $this->createGitIndexOperator([
135 135
             CH_PATH_FILES . '/storage/regextest1.txt'
136 136
         ]);
137
-        $index->method('getStagedFilesOfType')->willReturnCallback(function ($ext) {
137
+        $index->method('getStagedFilesOfType')->willReturnCallback(function($ext) {
138 138
             if ($ext === 'txt') {
139 139
                 return [
140 140
                     CH_PATH_FILES . '/storage/regextest1.txt'
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
             'regex' => '#foo#',
168 168
             'fileExtensions' => ['txt']
169 169
         ]);
170
-        $index  = $this->createGitIndexOperator([
170
+        $index = $this->createGitIndexOperator([
171 171
             CH_PATH_FILES . '/storage/regextest1.txt'
172 172
         ]);
173
-        $index->method('getStagedFilesOfType')->willReturnCallback(function ($ext) {
173
+        $index->method('getStagedFilesOfType')->willReturnCallback(function($ext) {
174 174
             if ($ext === 'txt') {
175 175
                 return [
176 176
                     CH_PATH_FILES . '/storage/regextest1.txt'
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             }
179 179
             return [];
180 180
         });
181
-        $repo   = $this->createRepositoryMock();
181
+        $repo = $this->createRepositoryMock();
182 182
         $repo->method('getIndexOperator')->willReturn($index);
183 183
 
184 184
         $standard = new DoesNotContainRegex();
Please login to merge, or discard this patch.
src/Console/Command/Hook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
                . PHP_EOL . IOUtil::getLineSeparator() . PHP_EOL
124 124
                . IOUtil::formatHeadline(get_class($e), 80, '>', '<') . PHP_EOL
125 125
                . IOUtil::getLineSeparator() . PHP_EOL
126
-               . $e->getMessage()  . PHP_EOL;
126
+               . $e->getMessage() . PHP_EOL;
127 127
 
128 128
         $output->writeLn($error);
129 129
 
Please login to merge, or discard this patch.
tests/CaptainHook/Hook/File/Action/IsEmptyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $io     = new NullIO();
104 104
         $config = new Config(CH_PATH_FILES . '/captainhook.json');
105 105
         $action = new Config\Action(IsEmpty::class, ['files' => [
106
-            CH_PATH_FILES . '/doesNotExist.txt',  // pass
106
+            CH_PATH_FILES . '/doesNotExist.txt', // pass
107 107
             CH_PATH_FILES . '/storage/empty.log', // pass
108 108
             CH_PATH_FILES . '/storage/test.json', // fail
109 109
         ]]);
Please login to merge, or discard this patch.