This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace DoctrineORMModuleTest\Options; |
||
4 | |||
5 | use PHPUnit\Framework\TestCase; |
||
6 | use DoctrineORMModule\Options\Configuration; |
||
7 | use Doctrine\ORM\Repository\DefaultRepositoryFactory; |
||
8 | |||
9 | class ConfigurationOptionsTest extends TestCase |
||
10 | { |
||
11 | public function testSetGetNamingStrategy() |
||
12 | { |
||
13 | $options = new Configuration(); |
||
14 | $options->setNamingStrategy(null); |
||
15 | $this->assertNull($options->getNamingStrategy()); |
||
0 ignored issues
–
show
|
|||
16 | |||
17 | $options->setNamingStrategy('test'); |
||
18 | $this->assertSame('test', $options->getNamingStrategy()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
19 | |||
20 | $namingStrategy = $this->createMock(\Doctrine\ORM\Mapping\NamingStrategy::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$namingStrategy is correct as $this->createMock(\Doctr...\NamingStrategy::class) (which targets PHPUnit\Framework\TestCase::createMock() ) seems to always return null.
This check looks for function or method calls that always return null and whose return value is assigned to a variable. class A
{
function getObject()
{
return null;
}
}
$a = new A();
$object = $a->getObject();
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. ![]() |
|||
21 | $options->setNamingStrategy($namingStrategy); |
||
22 | $this->assertSame($namingStrategy, $options->getNamingStrategy()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
23 | |||
24 | $this->expectException(\Laminas\Stdlib\Exception\InvalidArgumentException::class); |
||
0 ignored issues
–
show
The method
expectException() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
25 | $options->setNamingStrategy(new \stdClass()); |
||
0 ignored issues
–
show
new \stdClass() is of type object<stdClass> , but the function expects a string|object<Doctrine\O...ng\NamingStrategy>|null .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
26 | } |
||
27 | |||
28 | public function testSetGetQuoteStrategy() |
||
29 | { |
||
30 | $options = new Configuration(); |
||
31 | $options->setQuoteStrategy(null); |
||
32 | $this->assertNull($options->getQuoteStrategy()); |
||
0 ignored issues
–
show
The method
assertNull() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
33 | |||
34 | $options->setQuoteStrategy('test'); |
||
35 | $this->assertSame('test', $options->getQuoteStrategy()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
36 | |||
37 | $quoteStrategy = $this->createMock(\Doctrine\ORM\Mapping\QuoteStrategy::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$quoteStrategy is correct as $this->createMock(\Doctr...g\QuoteStrategy::class) (which targets PHPUnit\Framework\TestCase::createMock() ) seems to always return null.
This check looks for function or method calls that always return null and whose return value is assigned to a variable. class A
{
function getObject()
{
return null;
}
}
$a = new A();
$object = $a->getObject();
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. ![]() |
|||
38 | $options->setQuoteStrategy($quoteStrategy); |
||
39 | $this->assertSame($quoteStrategy, $options->getQuoteStrategy()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
40 | |||
41 | $this->expectException(\Laminas\Stdlib\Exception\InvalidArgumentException::class); |
||
0 ignored issues
–
show
The method
expectException() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
42 | $options->setQuoteStrategy(new \stdClass()); |
||
0 ignored issues
–
show
new \stdClass() is of type object<stdClass> , but the function expects a string|object<Doctrine\O...ing\QuoteStrategy>|null .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
43 | } |
||
44 | |||
45 | public function testSetRepositoryFactory() |
||
46 | { |
||
47 | $options = new Configuration(); |
||
48 | $options->setRepositoryFactory(null); |
||
49 | $this->assertNull($options->getRepositoryFactory()); |
||
0 ignored issues
–
show
The method
assertNull() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
50 | |||
51 | $options->setRepositoryFactory('test'); |
||
52 | $this->assertSame('test', $options->getRepositoryFactory()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
53 | |||
54 | $repositoryFactory = new DefaultRepositoryFactory(); |
||
55 | $options->setRepositoryFactory($repositoryFactory); |
||
56 | $this->assertSame($repositoryFactory, $options->getRepositoryFactory()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
57 | |||
58 | $this->expectException(\Laminas\Stdlib\Exception\InvalidArgumentException::class); |
||
0 ignored issues
–
show
The method
expectException() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
59 | $options->setRepositoryFactory(new \stdClass()); |
||
0 ignored issues
–
show
new \stdClass() is of type object<stdClass> , but the function expects a string|object<Doctrine\O...RepositoryFactory>|null .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
60 | } |
||
61 | |||
62 | public function testSetGetEntityListenerResolver() |
||
63 | { |
||
64 | $options = new Configuration(); |
||
65 | |||
66 | $options->setEntityListenerResolver(null); |
||
67 | $this->assertNull($options->getEntityListenerResolver()); |
||
0 ignored issues
–
show
The method
assertNull() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
68 | |||
69 | $options->setEntityListenerResolver('test'); |
||
70 | $this->assertSame('test', $options->getEntityListenerResolver()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
71 | |||
72 | $entityListenerResolver = $this->createMock(\Doctrine\ORM\Mapping\EntityListenerResolver::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$entityListenerResolver is correct as $this->createMock(\Doctr...istenerResolver::class) (which targets PHPUnit\Framework\TestCase::createMock() ) seems to always return null.
This check looks for function or method calls that always return null and whose return value is assigned to a variable. class A
{
function getObject()
{
return null;
}
}
$a = new A();
$object = $a->getObject();
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. ![]() |
|||
73 | |||
74 | $options->setEntityListenerResolver($entityListenerResolver); |
||
75 | $this->assertSame($entityListenerResolver, $options->getEntityListenerResolver()); |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
76 | |||
77 | $this->expectException(\Laminas\Stdlib\Exception\InvalidArgumentException::class); |
||
0 ignored issues
–
show
The method
expectException() does not seem to exist on object<DoctrineORMModule...nfigurationOptionsTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
78 | $options->setEntityListenerResolver(new \stdClass()); |
||
0 ignored issues
–
show
new \stdClass() is of type object<stdClass> , but the function expects a string|object<Doctrine\O...yListenerResolver>|null .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
79 | } |
||
80 | } |
||
81 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.