Completed
Push — master ( 4b0cae...92d247 )
by Pádraic
02:52
created
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.
src/Mutator/ReturnValue/BracketedStatement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@
 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] == '(') {
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];
Please login to merge, or discard this patch.
src/Mutator/ReturnValue/IntegerValue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public static function getMutation(array &$tokens, $index)
28 28
     {
29 29
         $tokenCount = count($tokens);
30
-        for ($i=$index+1; $i < $tokenCount; $i++) {
30
+        for ($i = $index+1; $i < $tokenCount; $i++) {
31 31
             if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
32 32
                 continue;
33 33
             } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_LNUMBER) {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         if (is_array($t) && $t[0] == T_RETURN) {
53 53
             $has = false;
54 54
             $tokenCount = count($tokens);
55
-            for ($i=$index+1; $i < $tokenCount; $i++) {
55
+            for ($i = $index+1; $i < $tokenCount; $i++) {
56 56
                 if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
57 57
                     continue;
58 58
                 } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_LNUMBER) {
Please login to merge, or discard this patch.
src/Mutator/ReturnValue/This.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_VARIABLE && $tokens[$i][1] == '$this') {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $hasThis = false;
46 46
             // effectively, we look for 'return $this;'. Anything else in there and we get out.
47 47
             $tokenCount = count($tokens);
48
-            for ($i=$index+1; $i < $tokenCount; $i++) {
48
+            for ($i = $index+1; $i < $tokenCount; $i++) {
49 49
                 if (is_array($tokens[$i]) && $tokens[$i][0] == T_WHITESPACE) {
50 50
                     continue;
51 51
                 } elseif (is_array($tokens[$i]) && $tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') {
Please login to merge, or discard this patch.
src/Mutator/ReturnValue/IntegerNegation.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_LNUMBER) {
@@ -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_LNUMBER && $tokens[$i][1] != 0) {
Please login to merge, or discard this patch.