Passed
Pull Request — master (#98)
by Sebastian
02:52 queued 42s
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.