@@ -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 | ]; |
@@ -82,16 +82,16 @@ |
||
| 82 | 82 | |
| 83 | 83 | protected function getLineNumber($line, $currentLineNumber) |
| 84 | 84 | { |
| 85 | - $matches = []; |
|
| 86 | - if (!preg_match($this->lineRegex, $line, $matches)) { |
|
| 87 | - if (preg_match('#^\s{3,}#', $line)) { |
|
| 85 | + $matches = []; |
|
| 86 | + if (!preg_match($this->lineRegex, $line, $matches)) { |
|
| 87 | + if (preg_match('#^\s{3,}#', $line)) { |
|
| 88 | 88 | return $currentLineNumber; |
| 89 | - } |
|
| 89 | + } |
|
| 90 | 90 | |
| 91 | - return false; |
|
| 92 | - } |
|
| 91 | + return false; |
|
| 92 | + } |
|
| 93 | 93 | |
| 94 | - return $matches['lineNumber']; |
|
| 94 | + return $matches['lineNumber']; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | protected function getMessage($line) |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | protected function checkForFilename($line, $currentFile) |
| 76 | 76 | { |
| 77 | 77 | if (strpos($line, " Line ")) { |
| 78 | - return trim(str_replace('Line', '',$line)); |
|
| 78 | + return trim(str_replace('Line', '', $line)); |
|
| 79 | 79 | } |
| 80 | 80 | return $currentFile; |
| 81 | 81 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | protected function trimLines() |
| 103 | 103 | { |
| 104 | - array_walk_recursive($this->invalidLines, function (&$item) { |
|
| 104 | + array_walk_recursive($this->invalidLines, function(&$item) { |
|
| 105 | 105 | if (is_string($item)) { |
| 106 | 106 | $item = trim($item); |
| 107 | 107 | } |