Conditions | 1 |
Paths | 1 |
Total Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Metric | Value |
---|---|
dl | 0 |
loc | 6 |
rs | 10 |
c | 0 |
b | 0 |
f | 0 |
cc | 1 |
nc | 1 |
nop | 0 |
1 | <?php |
||
2 | |||
3 | namespace DoctrineORMModuleTest\Yuml; |
||
4 | |||
5 | use DoctrineORMModule\Yuml\MetadataGrapher; |
||
6 | use PHPUnit\Framework\TestCase; |
||
7 | |||
8 | /** |
||
9 | * Tests for the metadata to string converter |
||
10 | * |
||
11 | * @license MIT |
||
12 | * @link http://www.doctrine-project.org/ |
||
13 | * @author Marco Pivetta <[email protected]> |
||
14 | */ |
||
15 | class MetadataGrapherTest extends TestCase |
||
16 | { |
||
17 | /** |
||
18 | * @var MetadataGrapher |
||
19 | */ |
||
20 | protected $grapher; |
||
21 | |||
22 | /** |
||
23 | * {@inheritDoc} |
||
24 | */ |
||
25 | public function setUp() : void |
||
26 | { |
||
27 | parent::setUp(); |
||
0 ignored issues
–
show
|
|||
28 | |||
29 | $this->grapher = new MetadataGrapher(); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
34 | */ |
||
35 | public function testDrawSimpleEntity() |
||
36 | { |
||
37 | $class = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class is correct as $this->createMock(\Doctr...g\ClassMetadata::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 | $class->expects($this->any())->method('getName')->will($this->returnValue('Simple\\Entity')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
39 | $class->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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 | $class->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
41 | |||
42 | $this->assertSame('[Simple.Entity]', $this->grapher->generateFromMetadata([$class])); |
||
0 ignored issues
–
show
array($class) is of type array<integer,null,{"0":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
47 | */ |
||
48 | public function testDrawSimpleEntityWithFields() |
||
49 | { |
||
50 | $class = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
51 | $class->expects($this->any())->method('getName')->will($this->returnValue('Simple\\Entity')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
52 | $class->expects($this->any())->method('getFieldNames')->will($this->returnValue(['a', 'b', 'c'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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 | $class->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
54 | $class->expects($this->any())->method('isIdentifier')->will( |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
55 | $this->returnCallback( |
||
0 ignored issues
–
show
The method
returnCallback() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
56 | function ($field) { |
||
57 | return $field === 'a'; |
||
58 | } |
||
59 | ) |
||
60 | ); |
||
61 | |||
62 | $this->assertSame('[Simple.Entity|+a;b;c]', $this->grapher->generateFromMetadata([$class])); |
||
0 ignored issues
–
show
array($class) is of type array<integer,null,{"0":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
67 | */ |
||
68 | public function testDrawOneToOneUniDirectionalAssociation() |
||
69 | { |
||
70 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
71 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
72 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
73 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
74 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
75 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
77 | |||
78 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
79 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
80 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
81 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
82 | |||
83 | $this->assertSame('[A]-b 1>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
84 | } |
||
85 | |||
86 | /** |
||
87 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
88 | */ |
||
89 | public function testDrawOneToOneBiDirectionalAssociation() |
||
90 | { |
||
91 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
92 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
93 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
94 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
95 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
96 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
97 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
98 | |||
99 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
100 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
101 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
102 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
103 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
104 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
105 | $class2->expects($this->any())->method('getAssociationMappedByTargetField')->will($this->returnValue('b')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
106 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
107 | |||
108 | $this->assertSame('[A]<>a 1-b 1>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
109 | } |
||
110 | |||
111 | /** |
||
112 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
113 | */ |
||
114 | public function testDrawOneToOneBiDirectionalInverseAssociation() |
||
115 | { |
||
116 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
117 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
118 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
119 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
120 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
121 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
122 | $class1->expects($this->any())->method('getAssociationMappedByTargetField')->will($this->returnValue('a')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
123 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
124 | |||
125 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
126 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
127 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
128 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
129 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
130 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
131 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
132 | |||
133 | $this->assertSame('[A]<a 1-b 1<>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
134 | } |
||
135 | |||
136 | /** |
||
137 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
138 | */ |
||
139 | public function testDrawOneToManyBiDirectionalAssociation() |
||
140 | { |
||
141 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
142 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
143 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
144 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
145 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
146 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
147 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
148 | |||
149 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
150 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
151 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
152 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
153 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
154 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
155 | $class2->expects($this->any())->method('getAssociationMappedByTargetField')->will($this->returnValue('b')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
156 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
157 | |||
158 | $this->assertSame('[A]<>a 1-b *>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
159 | } |
||
160 | |||
161 | /** |
||
162 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
163 | */ |
||
164 | public function testDrawOneToManyBiDirectionalInverseAssociation() |
||
165 | { |
||
166 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
167 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
168 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
169 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
170 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
171 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
172 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
173 | |||
174 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
175 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
176 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
177 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
178 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
179 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
180 | $class2->expects($this->any())->method('getAssociationMappedByTargetField')->will($this->returnValue('b')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
181 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
182 | |||
183 | $this->assertSame('[A]<>a *-b 1>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
184 | } |
||
185 | |||
186 | /** |
||
187 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
188 | */ |
||
189 | public function testDrawManyToManyUniDirectionalAssociation() |
||
190 | { |
||
191 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
192 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
193 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
194 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
195 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
196 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
197 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
198 | |||
199 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
200 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
201 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
202 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
203 | |||
204 | $this->assertSame('[A]-b *>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
205 | } |
||
206 | |||
207 | /** |
||
208 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
209 | */ |
||
210 | public function testDrawManyToManyUniDirectionalInverseAssociation() |
||
211 | { |
||
212 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
213 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
214 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
215 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
216 | |||
217 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
218 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
219 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
220 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
221 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
222 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
223 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
224 | |||
225 | $this->assertSame('[A],[B]-a *>[A]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
226 | } |
||
227 | |||
228 | /** |
||
229 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
230 | */ |
||
231 | public function testDrawManyToManyBiDirectionalAssociation() |
||
232 | { |
||
233 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
234 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
235 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
236 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
237 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
238 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
239 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
240 | |||
241 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
242 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
243 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
244 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
245 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
246 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
247 | $class2->expects($this->any())->method('getAssociationMappedByTargetField')->will($this->returnValue('b')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
248 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
249 | |||
250 | $this->assertSame('[A]<>a *-b *>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
251 | } |
||
252 | |||
253 | /** |
||
254 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
255 | */ |
||
256 | public function testDrawManyToManyBiDirectionalInverseAssociation() |
||
257 | { |
||
258 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
259 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
260 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
261 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
262 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
263 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
264 | $class1->expects($this->any())->method('getAssociationMappedByTargetField')->will($this->returnValue('a')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
265 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
266 | |||
267 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
268 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
269 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
270 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
271 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
272 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
273 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
274 | |||
275 | $this->assertSame('[A]<a *-b *<>[B]', $this->grapher->generateFromMetadata([$class1, $class2])); |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
276 | } |
||
277 | |||
278 | /** |
||
279 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
280 | */ |
||
281 | public function testDrawManyToManyAssociationWithoutKnownInverseSide() |
||
282 | { |
||
283 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
284 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
285 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
286 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
287 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
288 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
289 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
290 | |||
291 | $this->assertSame('[A]<>-b *>[B]', $this->grapher->generateFromMetadata([$class1])); |
||
0 ignored issues
–
show
array($class1) is of type array<integer,null,{"0":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
292 | } |
||
293 | |||
294 | /** |
||
295 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
296 | */ |
||
297 | public function testDrawInheritance() |
||
298 | { |
||
299 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
300 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
301 | $child = get_class($this->createMock('stdClass')); |
||
302 | $class1->expects($this->any())->method('getName')->will($this->returnValue('stdClass')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
303 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
304 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
305 | $class2->expects($this->any())->method('getName')->will($this->returnValue($child)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
306 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
307 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
308 | |||
309 | $this->assertSame( |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
310 | '[stdClass]^[' . str_replace('\\', '.', $child) . ']', |
||
311 | $this->grapher->generateFromMetadata([$class2, $class1]) |
||
0 ignored issues
–
show
array($class2, $class1) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() |
|||
312 | ); |
||
313 | } |
||
314 | |||
315 | /** |
||
316 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
317 | */ |
||
318 | public function testDrawInheritedFields() |
||
319 | { |
||
320 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
321 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
322 | $child = get_class($this->createMock('stdClass')); |
||
323 | |||
324 | $class1->expects($this->any())->method('getName')->will($this->returnValue('stdClass')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
325 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
326 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue(['inherited'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
327 | |||
328 | $class2->expects($this->any())->method('getName')->will($this->returnValue($child)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
329 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
330 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue(['inherited', 'field2'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
331 | |||
332 | $this->assertSame( |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
333 | '[stdClass|inherited]^[' . str_replace('\\', '.', $child) . '|field2]', |
||
334 | $this->grapher->generateFromMetadata([$class2, $class1]) |
||
0 ignored issues
–
show
array($class2, $class1) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() |
|||
335 | ); |
||
336 | } |
||
337 | |||
338 | /** |
||
339 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
340 | */ |
||
341 | public function testDrawInheritedAssociations() |
||
342 | { |
||
343 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
344 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
345 | $class3 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class3 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
346 | $class4 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class4 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
347 | $child = get_class($this->createMock('stdClass')); |
||
348 | |||
349 | $class1->expects($this->any())->method('getName')->will($this->returnValue('stdClass')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
350 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
351 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
352 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
353 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
354 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
355 | |||
356 | $class2->expects($this->any())->method('getName')->will($this->returnValue($child)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
357 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['a', 'b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
358 | $class2 |
||
0 ignored issues
–
show
|
|||
359 | ->expects($this->any()) |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
360 | ->method('getAssociationTargetClass') |
||
361 | ->will( |
||
362 | $this->returnCallback( |
||
0 ignored issues
–
show
The method
returnCallback() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
363 | function ($assoc) { |
||
364 | return strtoupper($assoc); |
||
365 | } |
||
366 | ) |
||
367 | ); |
||
368 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
369 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
370 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
371 | |||
372 | $class3->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
373 | $class3->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
374 | $class3->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
375 | |||
376 | $class4->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
377 | $class4->expects($this->any())->method('getAssociationNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
378 | $class4->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
379 | |||
380 | $childName = str_replace('\\', '.', $child); |
||
381 | $this->assertSame( |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
382 | '[stdClass]<>-a *>[A],[stdClass]^[' . $childName . '],[' . $childName . ']<>-b *>[B]', |
||
383 | $this->grapher->generateFromMetadata([$class1, $class2]) |
||
0 ignored issues
–
show
array($class1, $class2) is of type array<integer,null,{"0":"null","1":"null"}> , but the function expects a array<integer,object<Doc...Mapping\ClassMetadata>> .
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);
![]() |
|||
384 | ); |
||
385 | } |
||
386 | |||
387 | /** |
||
388 | * @covers \DoctrineORMModule\Yuml\MetadataGrapher |
||
389 | * @dataProvider injectMultipleRelationsWithBothBiAndMonoDirectional |
||
390 | */ |
||
391 | public function testDrawMultipleClassRelatedBothBiAndMonoDirectional($class1, $class2, $class3, $expected) |
||
392 | { |
||
393 | $this->assertSame( |
||
0 ignored issues
–
show
The method
assertSame() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
394 | $expected, |
||
395 | $this->grapher->generateFromMetadata([$class1, $class2,$class3]) |
||
396 | ); |
||
397 | } |
||
398 | |||
399 | /** |
||
400 | * dataProvider to inject classes in every order possible into the test |
||
401 | * testDrawMultipleClassRelatedBothBiAndMonoDirectional |
||
402 | * |
||
403 | * @return array |
||
404 | */ |
||
405 | public function injectMultipleRelationsWithBothBiAndMonoDirectional() |
||
406 | { |
||
407 | $class1 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class1 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
408 | $class1->expects($this->any())->method('getName')->will($this->returnValue('A')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
409 | $class1->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['c'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
410 | $class1->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('C')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
411 | $class1->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
412 | $class1->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
413 | $class1->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
414 | |||
415 | $class2 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class2 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
416 | $class2->expects($this->any())->method('getName')->will($this->returnValue('B')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
417 | $class2->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['c'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
418 | $class2->expects($this->any())->method('getAssociationTargetClass')->will($this->returnValue('C')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
419 | $class2->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
420 | $class2->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(false)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
421 | $class2->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
422 | |||
423 | $class3 = $this->createMock(\Doctrine\Common\Persistence\Mapping\ClassMetadata::class); |
||
0 ignored issues
–
show
Are you sure the assignment to
$class3 is correct as $this->createMock(\Doctr...g\ClassMetadata::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. ![]() |
|||
424 | $class3->expects($this->any())->method('getName')->will($this->returnValue('C')); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
425 | $class3->expects($this->any())->method('getAssociationNames')->will($this->returnValue(['b'])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
426 | $class3 |
||
0 ignored issues
–
show
|
|||
427 | ->expects($this->any()) |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
428 | ->method('getAssociationTargetClass') |
||
429 | ->with($this->logicalOr($this->equalTo('b'), $this->equalTo('c'))) |
||
0 ignored issues
–
show
The method
equalTo() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
logicalOr() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
430 | ->will($this->returnCallback([$this,'getAssociationTargetClassMock'])); |
||
0 ignored issues
–
show
The method
returnCallback() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
431 | $class3->expects($this->any())->method('isAssociationInverseSide')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
432 | $class3->expects($this->any())->method('isCollectionValuedAssociation')->will($this->returnValue(true)); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
433 | $class3->expects($this->any())->method('getFieldNames')->will($this->returnValue([])); |
||
0 ignored issues
–
show
The method
any() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() The method
returnValue() does not seem to exist on object<DoctrineORMModule...ml\MetadataGrapherTest> .
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. ![]() |
|||
434 | |||
435 | return [ |
||
436 | [$class1, $class2, $class3, '[A]-c 1>[C],[B]<>b *-c 1>[C]'], |
||
437 | [clone $class1, clone $class3, clone $class2, '[A]-c 1>[C],[C]<c 1-b *<>[B]'], |
||
438 | [clone $class2, clone $class1, clone $class3, '[B]<>b *-c 1>[C],[A]-c 1>[C]'], |
||
439 | [clone $class2, clone $class3, clone $class1, '[B]<>b *-c 1>[C],[A]-c 1>[C]'], |
||
440 | [clone $class3, clone $class1, clone $class2, '[C]<c 1-b *<>[B],[A]-c 1>[C]'], |
||
441 | [clone $class3, clone $class2, clone $class1, '[C]<c 1-b *<>[B],[A]-c 1>[C]'], |
||
442 | ]; |
||
443 | } |
||
444 | |||
445 | /** |
||
446 | * To mock getAssociationTargetClass method with args |
||
447 | * |
||
448 | * @param string $a |
||
449 | * @return string |
||
450 | */ |
||
451 | public function getAssociationTargetClassMock($a) |
||
452 | { |
||
453 | return strtoupper($a); |
||
454 | } |
||
455 | } |
||
456 |
Let’s take a look at an example:
In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different sub-classes of User which does not have a getDisplayName() method, the code will break.
Available Fixes
Change the type-hint for the parameter:
Add an additional type-check:
Add the method to the parent class: