Failed Conditions
Push — issue#797 ( 813539...e64f52 )
by Guilherme
03:53
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\AccountRecoveryBundle\Entity;
12
13
use Doctrine\ORM\EntityRepository;
14
use LoginCidadao\CoreBundle\Model\PersonInterface;
15
16
/**
17
 * AccountRecoveryDataRepository
18
 *
19
 * This class was generated by the Doctrine ORM. Add your own custom
20
 * repository methods below.
21
 */
22
class AccountRecoveryDataRepository extends EntityRepository
23
{
24
    public function findByPerson(PersonInterface $person): ?AccountRecoveryData
25
    {
26
        /** @var AccountRecoveryData|null $data */
27
        $data = $this->findOneBy(['person' => $person]);
28
29
        return $data;
30
    }
31
}
32