Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
23 | public function testSqlitePlugin() |
||
24 | { |
||
25 | $kernel = new AppKernel( |
||
26 | [ |
||
27 | 'ORM_DEFAULT_DRIVER' => 'pdo_sqlite', |
||
28 | 'ORM_DEFAULT_IN_MEMORY' => true, |
||
29 | ], |
||
30 | [DoctrinePlugin::class], |
||
31 | 'dev' |
||
32 | ); |
||
33 | |||
34 | $kernel->run(); |
||
35 | /** @var DoctrineFacadeInterface $doctrine */ |
||
36 | $doctrine = $kernel->container()->get(DoctrineFacadeInterface::class); |
||
37 | $manager = $doctrine->getManager(); |
||
|
|||
38 | $this->assertEquals($manager, $doctrine->getDefaultManager()); |
||
39 | |||
40 | $this->assertTrue($manager->getConnection()->connect()); |
||
41 | $manager->getConnection()->close(); |
||
42 | } |
||
44 |
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.