Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function testAggregation() |
||
32 | { |
||
33 | // get own composer.json as reference |
||
34 | $composerFile = file_get_contents("./composer.json"); |
||
35 | $composerJson = json_decode($composerFile, true); |
||
36 | |||
37 | // aggregating project data |
||
38 | $data = $this->aggregator->fetchProjectData($this->projectSampleData); |
||
|
|||
39 | |||
40 | // check equal names |
||
41 | $this->assertEquals($composerJson['name'], $data['composer']->name); |
||
42 | // check if dependencies are there |
||
43 | $this->assertNotEmpty($data['dependencies']); |
||
44 | |||
57 | } |
This check compares calls to functions or methods with their respective definitions. If the call has less 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.