| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class TypeGeneratorTest extends AbstractQueryProviderTest |
||
| 11 | { |
||
| 12 | private $container; |
||
| 13 | |||
| 14 | public function setUp() |
||
| 15 | { |
||
| 16 | $this->container = new Picotainer([ |
||
| 17 | TypeFoo::class => function() { return new TypeFoo(); }, |
||
| 18 | stdClass::class => function() { return new stdClass(); } |
||
| 19 | ]); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function testNameAndFields() |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testMapAnnotatedObjectException() |
||
| 34 | { |
||
| 35 | $typeGenerator = $this->getTypeGenerator(); |
||
| 36 | |||
| 37 | $this->expectException(MissingAnnotationException::class); |
||
| 38 | $typeGenerator->mapAnnotatedObject(stdClass::class, $this->getTypeMapper(), $this->container); |
||
| 39 | } |
||
| 40 | |||
| 41 | public function testextendAnnotatedObjectException() |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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.