ContentRepository   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A findByReference() 0 6 1
1
<?php
2
namespace Axstrad\Bundle\ContentBundle\Entity\Repository;
3
4
use Axstrad\Bundle\ContentBundle\Repository\ContentRepository as ContentRepositoryInterface;
5
use Doctrine\ORM\EntityRepository;
6
use PhpOption\Option as PhpOption;
7
8
/**
9
 * Axstrad\Bundle\ContentBundle\Entity\Repository\ContentRepository
10
 */
11
class ContentRepository extends EntityRepository implements
12
    ContentRepositoryInterface
13
{
14
    /**
15
     * @param string $reference
16
     * @return \Axstrad\Bundle\ContentBundle\Entity\Content
17
     * @uses findOneBy
18
     */
19
    public function findByReference($reference)
20
    {
21
        return PhpOption::fromValue(
22
            $this->findOneBy(array('reference' => $reference))
23
        );
24
    }
25
}
26