Completed
Branch v1.x-dev (5c2708)
by Benjamin
04:14
created

NameTrait::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Obblm\Core\Entity\Traits;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
trait NameTrait
8
{
9
    /**
10
     * @ORM\Column(type="string", length=255)
11
     */
12
    private $name;
13
14
    public function getName(): ?string
15
    {
16
        return $this->name;
17
    }
18
19 8
    public function setName(string $name): self
20
    {
21 8
        $this->name = $name;
22
23 8
        return $this;
24
    }
25
26
    public function __toString():?string
27
    {
28
        return $this->getName();
29
    }
30
}
31