Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class UngenerateFilesTest extends TestCase |
||
9 | { |
||
10 | private array $filesToGenerate = ['Controller', 'Repository', 'Model', 'Request', 'Resource', 'Collection', 'Policy', 'Test']; |
||
11 | |||
12 | protected string $modelName = 'Test'; |
||
13 | protected string $userPath = 'Tests'; |
||
14 | |||
15 | /** |
||
16 | * @param string $dataName |
||
17 | */ |
||
18 | public function __construct(?string $name = null, array $data = [], $dataName = '') |
||
19 | { |
||
20 | parent::__construct($name, $data, $dataName); |
||
21 | } |
||
22 | |||
23 | public function testUngenerate() |
||
31 | } |
||
32 | } |
||
34 |
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.