CountryTranslation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 22
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
8
 */
9
10
namespace AnimeDb\Bundle\CatalogBundle\Entity;
11
12
use Doctrine\ORM\Mapping as ORM;
13
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation;
14
15
/**
16
 * Country translation.
17
 *
18
 * @ORM\Entity
19
 * @ORM\Table(name="country_translation",
20
 *     uniqueConstraints={@ORM\UniqueConstraint(name="country_translation_idx", columns={
21
 *         "locale", "object_id", "field"
22
 *     })}
23
 * )
24
 *
25
 * @author  Peter Gribanov <[email protected]>
26
 */
27
class CountryTranslation extends AbstractPersonalTranslation
28
{
29
    /**
30
     * @ORM\ManyToOne(targetEntity="Country", inversedBy="translations")
31
     * @ORM\JoinColumn(name="object_id", referencedColumnName="id", onDelete="CASCADE")
32
     *
33
     * @var Country
34
     */
35
    protected $object;
36
37
    /**
38
     * @param string $locale
39
     * @param string $field
40
     * @param string $value
41
     */
42 1
    public function __construct($locale, $field, $value)
43
    {
44 1
        $this->setLocale($locale);
45 1
        $this->setField($field);
46 1
        $this->setContent($value);
47 1
    }
48
}
49