AbstractCustomOptionTranslation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 35
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setLabel() 0 6 1
A getLabel() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Pim\Bundle\CustomEntityBundle\Entity;
4
5
use Akeneo\Component\Localization\Model\AbstractTranslation;
6
use Akeneo\Component\Localization\Model\TranslationInterface;
7
8
/**
9
 * @author    Antoine Guigan <[email protected]>
10
 * @copyright 2013 Akeneo SAS (http://www.akeneo.com)
11
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
12
 *
13
 * @deprecated will be removed in 1.7, please use \Akeneo\Component\Localization\Model\AbstractTranslation
14
 */
15
class AbstractCustomOptionTranslation extends AbstractTranslation implements TranslationInterface
16
{
17
    /**
18
     * @var string $label
19
     */
20
    protected $label;
21
22
    /**
23
     * @param string $label
24
     *
25
     * @return AbstractCustomOptionTranslation
26
     */
27
    public function setLabel($label)
28
    {
29
        $this->label = $label;
30
31
        return $this;
32
    }
33
34
    /**
35
     * @return AbstractCustomOptionTranslation
36
     */
37
    public function getLabel()
38
    {
39
        return $this->label;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function __toString()
46
    {
47
        return (string) $this->label;
48
    }
49
}
50