Completed
Push — master ( 4b0cae...92d247 )
by Pádraic
02:52
created
src/Adapter/Phpunit/Job.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
      * Generate a new Job script to be executed under a separate PHP process
17 17
      *
18 18
      * @param null|string   $mutantFile
19
-     * @param array         $args
20 19
      * @param string        $bootstrap
21 20
      * @param null|string   $replacingFile
22 21
      * @return string
Please login to merge, or discard this patch.
src/Command/SelfUpdate.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,6 @@
 block discarded – undo
10 10
 
11 11
 namespace Humbug\Command;
12 12
 
13
-use Humbug\Exception\FilesystemException;
14
-use Humbug\Console\Application;
15 13
 use Symfony\Component\Console\Command\Command;
16 14
 use Symfony\Component\Console\Input\InputInterface;
17 15
 use Symfony\Component\Console\Input\InputOption;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
 
168 168
     protected function update(Updater $updater)
169 169
     {
170
-        $this->output->writeln('Updating...'.PHP_EOL);
170
+        $this->output->writeln('Updating...' . PHP_EOL);
171 171
         try {
172 172
             $result = $updater->update();
173 173
 
Please login to merge, or discard this patch.
src/Command/Stats.php 2 patches
Doc Comments   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,6 +136,9 @@  discard block
 block discarded – undo
136 136
         }
137 137
     }
138 138
 
139
+    /**
140
+     * @param string $sectionName
141
+     */
139 142
     private function printSectionHeaderColor($sectionName)
140 143
     {
141 144
         switch ($sectionName) {
@@ -163,7 +166,7 @@  discard block
 block discarded – undo
163 166
     /**
164 167
      * @param string $class
165 168
      * @param array $data
166
-     * @param $verbosityLevel
169
+     * @param integer $verbosityLevel
167 170
      */
168 171
     protected function printSectionData($class, $data, $verbosityLevel)
169 172
     {
@@ -280,6 +283,10 @@  discard block
 block discarded – undo
280 283
         return $this->generateDiffString($old, $new);
281 284
     }
282 285
 
286
+    /**
287
+     * @param string $old
288
+     * @param string $new
289
+     */
283 290
     private function generateDiffString($old, $new)
284 291
     {
285 292
         $fromStart = strspn($old ^ $new, "\0");
@@ -306,8 +313,8 @@  discard block
 block discarded – undo
306 313
 
307 314
     /**
308 315
      * @param $string
309
-     * @param $index
310
-     * @return array
316
+     * @param integer $index
317
+     * @return string[]
311 318
      */
312 319
     private function stringSplitByIndex($string, $index)
313 320
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -230,9 +230,9 @@  discard block
 block discarded – undo
230 230
         }
231 231
 
232 232
         $diff[$diffPos] = $this->generateDiffString($old, $new);
233
-        unset($diff[$diffPos + 1]);
233
+        unset($diff[$diffPos+1]);
234 234
 
235
-        $startLine = $diffLine - $diffPos + 3;
235
+        $startLine = $diffLine-$diffPos+3;
236 236
         $tag = ($startLine != $diffLine) ? 'comment' : 'fg=red';
237 237
 
238 238
         foreach ($diff as $num => $item) {
@@ -285,13 +285,13 @@  discard block
 block discarded – undo
285 285
         $fromStart = strspn($old ^ $new, "\0");
286 286
         $fromEnd = strspn(strrev($old) ^ strrev($new), "\0");
287 287
 
288
-        $oldEnd = strlen($old) - $fromEnd;
289
-        $newEnd = strlen($new) - $fromEnd;
288
+        $oldEnd = strlen($old)-$fromEnd;
289
+        $newEnd = strlen($new)-$fromEnd;
290 290
 
291 291
         $start = substr($new, 0, $fromStart);
292 292
         $end = substr($new, $newEnd);
293
-        $newDiff = substr($new, $fromStart, $newEnd - $fromStart);
294
-        $oldDiff = substr($old, $fromStart, $oldEnd - $fromStart);
293
+        $newDiff = substr($new, $fromStart, $newEnd-$fromStart);
294
+        $oldDiff = substr($old, $fromStart, $oldEnd-$fromStart);
295 295
 
296 296
         $result = sprintf(
297 297
             '%s<fg=red>%s</fg=red><fg=green>%s</fg=green>%s',
Please login to merge, or discard this patch.
src/TestSuite/Mutant/IncrementalCache.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Humbug\File\Collector as FileCollector;
15 15
 use Humbug\File\Collection as FileCollection;
16 16
 use Humbug\TestSuite\Mutant\Collector as ResultCollector;
17
-use Humbug\Adapter\AdapterAbstract;
18 17
 use Humbug\Utility\CoverageData;
19 18
 use Humbug\Exception\RuntimeException;
20 19
 
Please login to merge, or discard this patch.
src/Mutator/Number/IntegerValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         } elseif ($num == 1) {
31 31
             $replace = 0;
32 32
         } else {
33
-            $replace = $num + 1;
33
+            $replace = $num+1;
34 34
         }
35 35
         $tokens[$index] = [
36 36
             T_LNUMBER,
Please login to merge, or discard this patch.
src/Mutator/Number/FloatValue.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
         } elseif ($num == 1) {
32 32
             $replace = 0.0;
33 33
         } elseif ($num < 2) {
34
-            $replace = $num + 1;
34
+            $replace = $num+1;
35 35
         } else {
36 36
             $replace = 1.0;
37 37
         }
Please login to merge, or discard this patch.
src/Mutator/Arithmetic/BitwiseAnd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
             /**
36 36
              * Exclude likely uses of ampersand for references
37 37
              */
38
-            if (self::getNextToken($tokens, $index, [ T_WHITESPACE ]) === T_VARIABLE) {
38
+            if (self::getNextToken($tokens, $index, [T_WHITESPACE]) === T_VARIABLE) {
39 39
                 return false;
40 40
             }
41
-            if (self::getNextToken($tokens, $index, [ T_WHITESPACE ]) === T_FUNCTION) {
41
+            if (self::getNextToken($tokens, $index, [T_WHITESPACE]) === T_FUNCTION) {
42 42
                 return false;
43 43
             }
44
-            if (self::getPreviousToken($tokens, $index, [ T_WHITESPACE ]) === '=') {
44
+            if (self::getPreviousToken($tokens, $index, [T_WHITESPACE]) === '=') {
45 45
                 return false;
46 46
             }
47 47
             return true;
Please login to merge, or discard this patch.
src/Mutator/MutatorAbstract.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     private static function shouldSkip($token, array $excludeTokens)
32 32
     {
33
-        if (! is_array($token) && in_array($token, $excludeTokens, true)) {
33
+        if (!is_array($token) && in_array($token, $excludeTokens, true)) {
34 34
             return true;
35 35
         }
36 36
 
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $tokenCount = count($tokens);
51 51
         while ($index < $tokenCount && isset($tokens[$index+1])
52
-        && self::shouldSkip($tokens[$index + 1], $excludeTokens)) {
52
+        && self::shouldSkip($tokens[$index+1], $excludeTokens)) {
53 53
             $index++;
54 54
         }
55 55
 
56
-        if (! isset($tokens[$index+1])) {
56
+        if (!isset($tokens[$index+1])) {
57 57
             return false;
58 58
         }
59 59
 
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
     protected static function getPreviousToken(array &$tokens, $index, array $excludeTokens = [])
73 73
     {
74 74
         while ($index > 0 && isset($tokens[$index-1])
75
-        && self::shouldSkip($tokens[$index - 1], $excludeTokens)) {
75
+        && self::shouldSkip($tokens[$index-1], $excludeTokens)) {
76 76
             $index--;
77 77
         }
78 78
 
79
-        if (! isset($tokens[$index-1])) {
79
+        if (!isset($tokens[$index-1])) {
80 80
             return false;
81 81
         }
82 82
 
Please login to merge, or discard this patch.
src/Mutator/IfStatement/FunctionCallNegation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@
 block discarded – undo
47 47
 
48 48
     protected static function isANonNegatedFunctionInIfStatement(array &$tokens, $index)
49 49
     {
50
-        $max = count($tokens) - $index + 1;
50
+        $max = count($tokens)-$index+1;
51 51
         $bracketCount = 0;
52 52
         $inArg = false;
53
-        for ($i=$index+1; $i < $max; $i++) {
53
+        for ($i = $index+1; $i < $max; $i++) {
54 54
             if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
55 55
                 continue;
56 56
             } elseif (!is_array($tokens[$i]) && $tokens[$i] == '(') {
Please login to merge, or discard this patch.