Failed Conditions
Push — issue#797 ( 813539...e64f52 )
by Guilherme
03:53
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\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