Completed
Push — master ( 4b0cae...92d247 )
by Pádraic
02:52
created
src/Mutator/ReturnValue/FunctionCall.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
         $replace = [];
30 30
         $last = null;
31 31
         $tokenCount = count($tokens);
32
-        for ($i=$index+1; $i < $tokenCount; $i++) {
32
+        for ($i = $index+1; $i < $tokenCount; $i++) {
33 33
             if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
34 34
                 continue;
35 35
             } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_STRING && function_exists($tokens[$i][1])) {
36 36
                 // collect statement tokens (skipping one whitespace after 'return')
37
-                for ($j=$index+2; $j < $tokenCount; $j++) {
37
+                for ($j = $index+2; $j < $tokenCount; $j++) {
38 38
                     if (!is_array($tokens[$j]) && $tokens[$j] == ';') {
39
-                        $last = $j - 1;
39
+                        $last = $j-1;
40 40
                         break;
41 41
                     }
42 42
                     $replace[$j] = $tokens[$j];
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         if (is_array($t) && $t[0] == T_RETURN) {
71 71
             $has = false;
72 72
             $tokenCount = count($tokens);
73
-            for ($i=$index+1; $i < $tokenCount; $i++) {
73
+            for ($i = $index+1; $i < $tokenCount; $i++) {
74 74
                 if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
75 75
                     continue;
76 76
                 } elseif (is_array($tokens[$i]) && ($tokens[$i][0] == T_STRING && function_exists($tokens[$i][1]))) {
Please login to merge, or discard this patch.
src/Mutator/ReturnValue/NewObject.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
         $replace = [];
31 31
         $last = null;
32 32
         $tokenCount = count($tokens);
33
-        for ($i=$index+1; $i < $tokenCount; $i++) {
33
+        for ($i = $index+1; $i < $tokenCount; $i++) {
34 34
             if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
35 35
                 continue;
36 36
             } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_NEW) {
37 37
                 // collect statement tokens (skipping one whitespace after 'return')
38
-                for ($j=$index+2; $j < $tokenCount; $j++) {
38
+                for ($j = $index+2; $j < $tokenCount; $j++) {
39 39
                     if (!is_array($tokens[$j]) && $tokens[$j] == ';') {
40
-                        $last = $j - 1;
40
+                        $last = $j-1;
41 41
                         break;
42 42
                     }
43 43
                     $replace[$j] = $tokens[$j];
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         if (is_array($t) && $t[0] == T_RETURN) {
72 72
             $has = false;
73 73
             $tokenCount = count($tokens);
74
-            for ($i=$index+1; $i < $tokenCount; $i++) {
74
+            for ($i = $index+1; $i < $tokenCount; $i++) {
75 75
                 if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
76 76
                     continue;
77 77
                 } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_NEW) {
Please login to merge, or discard this patch.
src/Mutator/ReturnValue/FloatNegation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public static function getMutation(array &$tokens, $index)
26 26
     {
27 27
         $tokenCount = count($tokens);
28
-        for ($i=$index+1; $i < $tokenCount; $i++) {
28
+        for ($i = $index+1; $i < $tokenCount; $i++) {
29 29
             if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
30 30
                 continue;
31 31
             } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_DNUMBER) {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         if (is_array($t) && $t[0] == T_RETURN) {
56 56
             $has = false;
57 57
             $tokenCount = count($tokens);
58
-            for ($i=$index+1; $i < $tokenCount; $i++) {
58
+            for ($i = $index+1; $i < $tokenCount; $i++) {
59 59
                 if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
60 60
                     continue;
61 61
                 } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_DNUMBER && $tokens[$i][1] != 0) {
Please login to merge, or discard this patch.
src/Command/SelfUpdate.php 1 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 1 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/Utility/Performance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
     public static function getTime()
32 32
     {
33 33
         if (empty(self::$endTime)) {
34
-            return microtime(true) - self::$startTime;
34
+            return microtime(true)-self::$startTime;
35 35
         }
36
-        return self::$endTime - self::$startTime;
36
+        return self::$endTime-self::$startTime;
37 37
     }
38 38
 
39 39
     public static function getTimeString()
Please login to merge, or discard this patch.
src/Utility/CoverageData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $file = realpath($file);
91 91
         if (!$this->hasTestClasses($file, $line)) {
92 92
             throw new NoCoveringTestsException(
93
-                'Line '.$line.' of '.$file.' has no associated test classes per '
93
+                'Line ' . $line . ' of ' . $file . ' has no associated test classes per '
94 94
                 . 'the coverage report'
95 95
             );
96 96
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         if (!$this->hasTestClasses($file, $line)) {
117 117
             throw new NoCoveringTestsException(
118
-                'Line '.$line.' of '.$file.' has no associated test classes per '
118
+                'Line ' . $line . ' of ' . $file . ' has no associated test classes per '
119 119
                 . 'the coverage report'
120 120
             );
121 121
         }
Please login to merge, or discard this patch.
src/Utility/Diff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         $max = strlen($string);
48 48
         $n = 0;
49
-        for ($i=0; $i < $max; $i++) {
49
+        for ($i = 0; $i < $max; $i++) {
50 50
             if ($string[$i] == $needle) {
51 51
                 $n++;
52 52
                 if ($n >= $nth) {
Please login to merge, or discard this patch.
src/Adapter/Phpunit/XmlConfiguration/ObjectVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,6 +72,6 @@
 block discarded – undo
72 72
             $argumentValue->visitElement($object);
73 73
             return $object;
74 74
         }
75
-        throw new InvalidArgumentException('Unsupported type: '. gettype($argumentValue));
75
+        throw new InvalidArgumentException('Unsupported type: ' . gettype($argumentValue));
76 76
     }
77 77
 }
Please login to merge, or discard this patch.