Passed
Push — master ( 25257e...5200e3 )
by Alec
04:00
created

Nameable::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * User: alec
4
 * Date: 19.11.18
5
 * Time: 19:52
6
 */
7
declare(strict_types=1);
8
9
namespace AlecRabbit\Traits;
10
11
trait Nameable
12
{
13
    /** @var string */
14
    protected $name;
15
16
    /**
17
     * @return string
18
     */
19 4
    public function getName(): string
20
    {
21 4
        return $this->name;
22
    }
23
24
    /**
25
     * @param string $name
26
     * @return self
27
     */
28 52
    public function setName(string $name): self
29
    {
30 52
        $this->name = $name;
31 52
        return $this;
32
    }
33
}
34