@@ -141,8 +141,7 @@ |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | $message = isset($this->cache->coveredLines[$matchedFile][$line]) |
| 144 | - ? $this->cache->coveredLines[$matchedFile][$line] : |
|
| 145 | - "No cover" |
|
| 144 | + ? $this->cache->coveredLines[$matchedFile][$line] : "No cover" |
|
| 146 | 145 | ; |
| 147 | 146 | |
| 148 | 147 | $this->addUnCoveredLine( |
@@ -33,8 +33,7 @@ |
||
| 33 | 33 | protected function letterArg($name) |
| 34 | 34 | { |
| 35 | 35 | $name = strlen($name) == 1 ? |
| 36 | - "-" . $name : |
|
| 37 | - "--" . $name; |
|
| 36 | + "-" . $name : "--" . $name; |
|
| 38 | 37 | foreach ($this->args as $arg) { |
| 39 | 38 | if ($arg{0} == '-' && $name == $arg) { |
| 40 | 39 | return true; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -spl_autoload_register(function ($className) { |
|
| 3 | +spl_autoload_register(function($className) { |
|
| 4 | 4 | $classPrefix = 'exussum12\CoverageChecker'; |
| 5 | 5 | if (strpos($className, $classPrefix) === 0) { |
| 6 | 6 | $classPrefix = str_replace("\\", "\\\\", $classPrefix); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | 'newFile' => [ |
| 32 | 32 | __DIR__ . '/fixtures/newFile.txt', |
| 33 | 33 | [ |
| 34 | - 'changedFile.php' => [1,2,3] |
|
| 34 | + 'changedFile.php' => [1, 2, 3] |
|
| 35 | 35 | ] |
| 36 | 36 | ], |
| 37 | 37 | 'lineChange' => [ |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | __DIR__ . '/fixtures/multiple.txt', |
| 45 | 45 | [ |
| 46 | 46 | 'changedFile.php' => [3], |
| 47 | - 'newFile.php' => [1,2,3] |
|
| 47 | + 'newFile.php' => [1, 2, 3] |
|
| 48 | 48 | ] |
| 49 | 49 | ], |
| 50 | 50 | 'removeFile' => [ |
@@ -14,23 +14,23 @@ discard block |
||
| 14 | 14 | $diffFileState = $this->createMock(DiffFileLoader::class); |
| 15 | 15 | $diffFileState->method('getChangedLines') |
| 16 | 16 | ->willReturn([ |
| 17 | - 'testFile1.php' => [1,2,3,4], |
|
| 18 | - 'testFile2.php' => [3,4] |
|
| 17 | + 'testFile1.php' => [1, 2, 3, 4], |
|
| 18 | + 'testFile2.php' => [3, 4] |
|
| 19 | 19 | |
| 20 | 20 | ]); |
| 21 | 21 | |
| 22 | 22 | $xmlReport = $this->createMock(XMLReport::class); |
| 23 | 23 | $xmlReport->method('getLines') |
| 24 | 24 | ->willReturn([ |
| 25 | - '/full/path/to/testFile1.php' => [1 => 1,2 => 0,3 => 1,4 => 1], |
|
| 26 | - '/full/path/to/testFile2.php' => [3 => 1,4 => 0] |
|
| 25 | + '/full/path/to/testFile1.php' => [1 => 1, 2 => 0, 3 => 1, 4 => 1], |
|
| 26 | + '/full/path/to/testFile2.php' => [3 => 1, 4 => 0] |
|
| 27 | 27 | |
| 28 | 28 | ]); |
| 29 | 29 | |
| 30 | 30 | $xmlReport->method('isValidLine') |
| 31 | 31 | ->will( |
| 32 | 32 | $this->returnCallback( |
| 33 | - function () { |
|
| 33 | + function() { |
|
| 34 | 34 | $file = func_get_arg(0); |
| 35 | 35 | $line = func_get_arg(1); |
| 36 | 36 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'testFile2.php' => [4 => 0], |
| 55 | 55 | ]; |
| 56 | 56 | $coveredLines = [ |
| 57 | - 'testFile1.php' => [1,3,4], |
|
| 57 | + 'testFile1.php' => [1, 3, 4], |
|
| 58 | 58 | 'testFile2.php' => [3], |
| 59 | 59 | ]; |
| 60 | 60 | |
@@ -71,15 +71,15 @@ discard block |
||
| 71 | 71 | $diffFileState = $this->createMock(DiffFileLoader::class); |
| 72 | 72 | $diffFileState->method('getChangedLines') |
| 73 | 73 | ->willReturn([ |
| 74 | - 'testFile1.php' => [1,2,3,4], |
|
| 75 | - 'testFile2.php' => [3,4], |
|
| 74 | + 'testFile1.php' => [1, 2, 3, 4], |
|
| 75 | + 'testFile2.php' => [3, 4], |
|
| 76 | 76 | |
| 77 | 77 | ]); |
| 78 | 78 | |
| 79 | 79 | $xmlReport = $this->createMock(XMLReport::class); |
| 80 | 80 | $xmlReport->method('getLines') |
| 81 | 81 | ->willReturn([ |
| 82 | - '/full/path/to/testFile1.php' => [1 => 1,2 => 0,3 => 1,4 => 1], |
|
| 82 | + '/full/path/to/testFile1.php' => [1 => 1, 2 => 0, 3 => 1, 4 => 1], |
|
| 83 | 83 | |
| 84 | 84 | ]); |
| 85 | 85 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $xmlReport->method('isValidLine') |
| 90 | 90 | ->will( |
| 91 | 91 | $this->returnCallback( |
| 92 | - function () { |
|
| 92 | + function() { |
|
| 93 | 93 | $file = func_get_arg(0); |
| 94 | 94 | $line = func_get_arg(1); |
| 95 | 95 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | 'testFile1.php' => [2 => 0], |
| 111 | 111 | ]; |
| 112 | 112 | $coveredLines = [ |
| 113 | - 'testFile1.php' => [1,3,4], |
|
| 113 | + 'testFile1.php' => [1, 3, 4], |
|
| 114 | 114 | ]; |
| 115 | 115 | |
| 116 | 116 | $expected = [ |
@@ -126,15 +126,15 @@ discard block |
||
| 126 | 126 | $diffFileState = $this->createMock(DiffFileLoader::class); |
| 127 | 127 | $diffFileState->method('getChangedLines') |
| 128 | 128 | ->willReturn([ |
| 129 | - 'testFile1.php' => [1,2,3,4], |
|
| 130 | - 'testFile2.php' => [3,4], |
|
| 129 | + 'testFile1.php' => [1, 2, 3, 4], |
|
| 130 | + 'testFile2.php' => [3, 4], |
|
| 131 | 131 | |
| 132 | 132 | ]); |
| 133 | 133 | |
| 134 | 134 | $xmlReport = $this->createMock(XMLReport::class); |
| 135 | 135 | $xmlReport->method('getLines') |
| 136 | 136 | ->willReturn([ |
| 137 | - '/full/path/to/testFile1.php' => [1 => 1,2 => 0,3 => 1,4 => 1], |
|
| 137 | + '/full/path/to/testFile1.php' => [1 => 1, 2 => 0, 3 => 1, 4 => 1], |
|
| 138 | 138 | |
| 139 | 139 | ]); |
| 140 | 140 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $xmlReport->method('isValidLine') |
| 145 | 145 | ->will( |
| 146 | 146 | $this->returnCallback( |
| 147 | - function () { |
|
| 147 | + function() { |
|
| 148 | 148 | $file = func_get_arg(0); |
| 149 | 149 | $line = func_get_arg(1); |
| 150 | 150 | |
@@ -165,8 +165,8 @@ discard block |
||
| 165 | 165 | 'testFile1.php' => [2 => 0], |
| 166 | 166 | ]; |
| 167 | 167 | $coveredLines = [ |
| 168 | - 'testFile1.php' => [1,3,4], |
|
| 169 | - 'testFile2.php' => [3,4], |
|
| 168 | + 'testFile1.php' => [1, 3, 4], |
|
| 169 | + 'testFile2.php' => [3, 4], |
|
| 170 | 170 | ]; |
| 171 | 171 | |
| 172 | 172 | $expected = [ |
@@ -182,15 +182,15 @@ discard block |
||
| 182 | 182 | $diffFileState = $this->createMock(DiffFileLoader::class); |
| 183 | 183 | $diffFileState->method('getChangedLines') |
| 184 | 184 | ->willReturn([ |
| 185 | - 'testFile1.php' => [1,2,3,4], |
|
| 186 | - 'testFile2.php' => [3,4], |
|
| 185 | + 'testFile1.php' => [1, 2, 3, 4], |
|
| 186 | + 'testFile2.php' => [3, 4], |
|
| 187 | 187 | |
| 188 | 188 | ]); |
| 189 | 189 | |
| 190 | 190 | $xmlReport = $this->createMock(XMLReport::class); |
| 191 | 191 | $xmlReport->method('getLines') |
| 192 | 192 | ->willReturn([ |
| 193 | - '/full/path/to/testFile1.php' => [1 => 1,2 => 0,3 => 1,4 => 1], |
|
| 193 | + '/full/path/to/testFile1.php' => [1 => 1, 2 => 0, 3 => 1, 4 => 1], |
|
| 194 | 194 | |
| 195 | 195 | ]); |
| 196 | 196 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $xmlReport->method('isValidLine') |
| 201 | 201 | ->will( |
| 202 | 202 | $this->returnCallback( |
| 203 | - function () { |
|
| 203 | + function() { |
|
| 204 | 204 | $file = func_get_arg(0); |
| 205 | 205 | $line = func_get_arg(1); |
| 206 | 206 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | 'testFile2.php' => [3 => 0, 4 => 0], |
| 223 | 223 | ]; |
| 224 | 224 | $coveredLines = [ |
| 225 | - 'testFile1.php' => [1,3,4], |
|
| 225 | + 'testFile1.php' => [1, 3, 4], |
|
| 226 | 226 | ]; |
| 227 | 227 | |
| 228 | 228 | $expected = [ |
@@ -238,14 +238,14 @@ discard block |
||
| 238 | 238 | $diffFileState = $this->createMock(DiffFileLoader::class); |
| 239 | 239 | $diffFileState->method('getChangedLines') |
| 240 | 240 | ->willReturn([ |
| 241 | - 'testFile1.php' => [1,2,4], |
|
| 241 | + 'testFile1.php' => [1, 2, 4], |
|
| 242 | 242 | |
| 243 | 243 | ]); |
| 244 | 244 | |
| 245 | 245 | $xmlReport = $this->createMock(XMLReport::class); |
| 246 | 246 | $xmlReport->method('getLines') |
| 247 | 247 | ->willReturn([ |
| 248 | - '/full/path/to/testFile1.php' => [1 => 1,4 => 1], |
|
| 248 | + '/full/path/to/testFile1.php' => [1 => 1, 4 => 1], |
|
| 249 | 249 | |
| 250 | 250 | ]); |
| 251 | 251 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $xmlReport->method('isValidLine') |
| 256 | 256 | ->will( |
| 257 | 257 | $this->returnCallback( |
| 258 | - function () { |
|
| 258 | + function() { |
|
| 259 | 259 | $file = func_get_arg(0); |
| 260 | 260 | $line = func_get_arg(1); |
| 261 | 261 | |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | $lines = $coverageCheck->getCoveredLines(); |
| 274 | 274 | |
| 275 | 275 | $coveredLines = [ |
| 276 | - 'testFile1.php' => [1,4], |
|
| 276 | + 'testFile1.php' => [1, 4], |
|
| 277 | 277 | ]; |
| 278 | 278 | |
| 279 | 279 | $expected = [ |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | if ($skipTest) { |
| 64 | 64 | continue; |
| 65 | 65 | } |
| 66 | - $runTests[]= $test; |
|
| 66 | + $runTests[] = $test; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $suite->setTests($runTests); |
@@ -1,32 +1,32 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $coverage = new SebastianBergmann\CodeCoverage\CodeCoverage; |
| 3 | -$coverage->setData(array ( |
|
| 3 | +$coverage->setData(array( |
|
| 4 | 4 | '/home/scott/code/coverageChecker/src/ArgParser.php' => |
| 5 | - array ( |
|
| 5 | + array( |
|
| 6 | 6 | 10 => |
| 7 | - array ( |
|
| 7 | + array( |
|
| 8 | 8 | 0 => 'exussum12\\CoverageChecker\\tests\\ArgParserTest::testNumericArgs', |
| 9 | 9 | 1 => 'exussum12\\CoverageChecker\\tests\\ArgParserTest::testAlphaArgs', |
| 10 | 10 | ), |
| 11 | 11 | 11 => |
| 12 | - array ( |
|
| 12 | + array( |
|
| 13 | 13 | 0 => 'exussum12\\CoverageChecker\\tests\\ArgParserTest::testNumericArgs', |
| 14 | 14 | 1 => 'exussum12\\CoverageChecker\\tests\\ArgParserTest::testAlphaArgs', |
| 15 | 15 | ), |
| 16 | 16 | 15 => |
| 17 | - array ( |
|
| 17 | + array( |
|
| 18 | 18 | 0 => 'exussum12\\CoverageChecker\\tests\\ArgParserTest::testNumericArgs', |
| 19 | 19 | ), |
| 20 | 20 | 20 => null, |
| 21 | 21 | 24 => |
| 22 | - array ( |
|
| 22 | + array( |
|
| 23 | 23 | 0 => 'exussum12\\CoverageChecker\\tests\\ArgParserTest::testNumericArgs', |
| 24 | 24 | 1 => 'exussum12\\CoverageChecker\\tests\\GenericDiffFilterTest::testValid', |
| 25 | 25 | 2 => 'exussum12\\CoverageChecker\\tests\\GenericDiffFilterTest::testMissingHandler', |
| 26 | 26 | 3 => 'exussum12\\CoverageChecker\\tests\\PhpcsDiffFilterTest::testValid', |
| 27 | 27 | ), |
| 28 | 28 | 25 => |
| 29 | - array ( |
|
| 29 | + array( |
|
| 30 | 30 | 0 => 'exussum12\\CoverageChecker\\tests\\ArgParserTest::testNumericArgs', |
| 31 | 31 | 1 => 'exussum12\\CoverageChecker\\tests\\GenericDiffFilterTest::testValid', |
| 32 | 32 | 2 => 'exussum12\\CoverageChecker\\tests\\GenericDiffFilterTest::testMissingHandler', |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | )); |
| 38 | 38 | |
| 39 | 39 | $filter = $coverage->filter(); |
| 40 | -$filter->setWhitelistedFiles(array ( |
|
| 40 | +$filter->setWhitelistedFiles(array( |
|
| 41 | 41 | '/home/scott/code/coverageChecker/src/ArgParser.php' => true, |
| 42 | 42 | )); |
| 43 | 43 | |
@@ -36,13 +36,13 @@ |
||
| 36 | 36 | [ |
| 37 | 37 | 'changedFile.php' => [3], |
| 38 | 38 | 'dev/null' => [-1], |
| 39 | - 'deletedFile.php' => [1,2,3] |
|
| 39 | + 'deletedFile.php' => [1, 2, 3] |
|
| 40 | 40 | ] |
| 41 | 41 | ], |
| 42 | 42 | 'removeFile' => [ |
| 43 | 43 | __DIR__ . '/fixtures/removeFile.txt', |
| 44 | 44 | [ |
| 45 | - 'deletedFile.php' => [1,2,3] |
|
| 45 | + 'deletedFile.php' => [1, 2, 3] |
|
| 46 | 46 | ] |
| 47 | 47 | ], |
| 48 | 48 | ]; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | ], |
| 26 | 26 | 'src/PhpCsLoader.php' => [ |
| 27 | 27 | 71 => 'Parameter $message of method ' . |
| 28 | - 'exussum12\CoverageChecker\PhpCsLoader::addInvalidLine() has '. |
|
| 28 | + 'exussum12\CoverageChecker\PhpCsLoader::addInvalidLine() has ' . |
|
| 29 | 29 | 'invalid typehint type exussum12\CoverageChecker\stdClass.', |
| 30 | 30 | ], |
| 31 | 31 | ]; |