TranslatableEntity   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __call() 0 4 1
A getId() 0 4 1
A setLocale() 0 6 1
A getLocale() 0 4 1
1
<?php
2
3
namespace Sonata\TranslationBundle\Tests\Fixtures\Model\Knplabs;
4
5
use Knp\DoctrineBehaviors\Model;
6
use Sonata\TranslationBundle\Model\TranslatableInterface;
7
8
class TranslatableEntity implements TranslatableInterface
9
{
10
    use Model\Translatable\Translatable;
11
12
    private $id;
13
14
    public function __call($method, $arguments)
15
    {
16
        return $this->proxyCurrentLocaleTranslation($method, $arguments);
17
    }
18
19
    /**
20
     * Returns object id.
21
     *
22
     * @return integer
23
     */
24
    public function getId()
25
    {
26
        return $this->id;
27
    }
28
29
    /**
30
     * @param string $locale
31
     */
32
    public function setLocale($locale)
33
    {
34
        $this->setCurrentLocale($locale);
35
36
        return $this;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getLocale()
43
    {
44
        return $this->getCurrentLocale();
45
    }
46
}
47