@@ -10,8 +10,6 @@ |
||
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; |
@@ -167,7 +167,7 @@ |
||
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 |
@@ -14,7 +14,6 @@ |
||
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 |
@@ -30,7 +30,7 @@ |
||
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, |
@@ -31,7 +31,7 @@ |
||
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 | } |
@@ -35,13 +35,13 @@ |
||
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; |
@@ -30,7 +30,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -47,10 +47,10 @@ |
||
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] == '(') { |
@@ -30,14 +30,14 @@ |
||
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]; |
@@ -27,7 +27,7 @@ discard block |
||
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 |
||
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) { |