Passed
Push — master ( 592d0d...a3c87c )
by Alec
02:52
created

Nameable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 21
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 4 1
A getName() 0 3 1
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
    public function getName(): string
20
    {
21
        return $this->name;
22
    }
23
24
    /**
25
     * @param string $name
26
     * @return self
27
     */
28
    public function setName(string $name): self
29
    {
30
        $this->name = $name;
31
        return $this;
32
    }
33
}
34