@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $phar->addFile('autoload.php'); |
| 13 | 13 | $phar->addFile('bin/diffFilter'); |
| 14 | 14 | |
| 15 | -$code = realpath(__DIR__.'/src'); |
|
| 15 | +$code = realpath(__DIR__ . '/src'); |
|
| 16 | 16 | $codeLength = strlen($code); |
| 17 | 17 | $directory = new RecursiveDirectoryIterator( |
| 18 | 18 | $code, |
@@ -11,6 +11,9 @@ discard block |
||
| 11 | 11 | protected $classes = []; |
| 12 | 12 | protected $functions = []; |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param string $sourceCode |
|
| 16 | + */ |
|
| 14 | 17 | public function __construct($sourceCode) |
| 15 | 18 | { |
| 16 | 19 | $this->sourceCode = $sourceCode; |
@@ -53,11 +56,17 @@ discard block |
||
| 53 | 56 | return new CodeLimits($startLine, $endLine); |
| 54 | 57 | } |
| 55 | 58 | |
| 59 | + /** |
|
| 60 | + * @param CodeLimits $classLimits |
|
| 61 | + */ |
|
| 56 | 62 | protected function addClass($classLimits) |
| 57 | 63 | { |
| 58 | 64 | $this->classes[] = $classLimits; |
| 59 | 65 | } |
| 60 | 66 | |
| 67 | + /** |
|
| 68 | + * @param CodeLimits $classLimits |
|
| 69 | + */ |
|
| 61 | 70 | protected function addFunction($classLimits) |
| 62 | 71 | { |
| 63 | 72 | $this->functions[] = $classLimits; |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | { |
| 6 | 6 | /** |
| 7 | 7 | */ |
| 8 | - public function testFunction ( |
|
| 8 | + public function testFunction( |
|
| 9 | 9 | $param1, |
| 10 | 10 | $param2 |
| 11 | 11 | ) { |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | if (!empty($this->invalidLines[$file][$lineNumber])) { |
| 108 | - $errors = array_merge($errors, $this->invalidLines[$file][$lineNumber]); |
|
| 108 | + $errors = array_merge($errors, $this->invalidLines[$file][$lineNumber]); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | if (!empty($this->invalidRanges[$file])) { |