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

AccountRecoveryDataRepository::findByPerson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
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