Completed
Push — master ( 8c953e...7fbcf6 )
by Thomas
37s
created

OneToOne   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fetch() 0 4 1
1
<?php
2
3
namespace ORM\Relation;
4
5
use ORM\Entity;
6
use ORM\EntityManager;
7
8
class OneToOne extends OneToMany
9
{
10
    /** {@inheritdoc} */
11 3
    public function fetch(Entity $me, EntityManager $entityManager)
12
    {
13 3
        return parent::fetch($me, $entityManager)->one();
1 ignored issue
show
Bug Compatibility introduced by
The expression parent::fetch($me, $entityManager)->one(); of type ORM\Entity|null adds the type ORM\Entity to the return on line 13 which is incompatible with the return type of the parent method ORM\Relation\OneToMany::fetch of type ORM\EntityFetcher.
Loading history...
14
    }
15
}
16