| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | final class PhpScoper implements Compactor |
||
| 22 | { |
||
| 23 | private $scoper; |
||
| 24 | private $config; |
||
| 25 | |||
| 26 | public function __construct(Scoper $scoper, PhpScoperConfiguration $config) |
||
| 27 | { |
||
| 28 | $this->scoper = $scoper; |
||
| 29 | $this->config = $config; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | public function compact(string $file, string $contents): string |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getConfiguration(): PhpScoperConfiguration |
||
| 52 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.