Failed Conditions
Push — issue#797 ( 813539 )
by Guilherme
07:02
created

AccountRecoveryDataRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 8
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A findByPerson() 0 6 1
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace LoginCidadao\CoreBundle\Entity;
12
13
use LoginCidadao\CoreBundle\Model\PersonInterface;
14
15
/**
16
 * AccountRecoveryDataRepository
17
 *
18
 * This class was generated by the Doctrine ORM. Add your own custom
19
 * repository methods below.
20
 */
21
class AccountRecoveryDataRepository extends \Doctrine\ORM\EntityRepository
22
{
23
    public function findByPerson(PersonInterface $person): ?AccountRecoveryData
24
    {
25
        /** @var AccountRecoveryData|null $data */
26
        $data = $this->findOneBy(['person' => $person]);
27
28
        return $data;
29
    }
30
}
31