Completed
Pull Request — master (#6)
by Sandor
03:18
created

AbstractRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setConfig() 0 5 1
1
<?php
2
3
4
namespace Orbitale\Bundle\CmsBundle\Repository;
5
6
use Doctrine\ORM\EntityRepository;
7
8
/**
9
 * Class AbstractRepository
10
 * @package Orbitale\Bundle\CmsBundle\Repository
11
 */
12
class AbstractRepository extends EntityRepository
13
{
14
15
    /**
16
     * @var bool
17
     */
18
    protected $cacheEnabled = false;
19
20
    /**
21
     * @var int
22
     */
23
    protected $cacheTtl;
24
25
    /**
26
     * @param array $config
27
     */
28
    public function setConfig(array $config)
29
    {
30
        $this->cacheEnabled = $config['cache']['enabled'];
31
        $this->cacheTtl = $config['cache']['ttl'];
32
    }
33
}