Completed
Pull Request — master (#8)
by Nicolas
28:01
created

NameableTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 26
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A setName() 0 4 1
1
<?php
2
3
namespace Smart\ContentBundle\Entity\Traits;
4
5
use Doctrine\Orm\Mapping as ORM;
6
use Symfony\Component\Validator\Constraints as Assert;
7
8
trait NameableTrait
9
{
10
    /**
11
     * @var string
12
     *
13
     * @ORM\Column(name="name", type="string", length=255)
14
     * @Assert\NotBlank()
15
     */
16
    protected $name;
17
18
    /**
19
     * @return string
20
     */
21
    public function getName()
22
    {
23
        return $this->name;
24
    }
25
26
    /**
27
     * @param string $name
28
     */
29 1
    public function setName($name)
30
    {
31 1
        $this->name = $name;
32 1
    }
33
}
34