TranslatableEntity::getLocale()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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