Passed
Push — master ( 1b9891...006f9a )
by Petr
04:14
created

AmbassadorRepository::findOneByFormData()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 1
crap 2
1
<?php
2
3
namespace AppBundle\Entity\Infrasctucture;
4
5
use AppBundle\Exception\HttpRuntimeException;
6
use AppBundle\Form\AbstractFormType;
7
use AppBundle\Form\Ambassador\AmbassadorFormType;
8
9
/**
10
 * @author Vehsamrak
11
 */
12
class AmbassadorRepository extends AbstractRepository
13
{
14
15
    /**
16
     * @return Ambassador|object|null
17
     */
18 2
    public function findOneByName(string $name)
19
    {
20 2
        return $this->findOneBy(
21
            [
22 2
                'name' => $name,
23
            ]
24
        );
25
    }
26
}
27