Name::setName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace steevanb\EntityUtils\Traits\Accessor;
4
5
/**
6
 * This trait need a property named $name
7
 */
8
trait Name
9
{
10
    /**
11
     * Set name
12
     *
13
     * @param string $name
14
     * @return $this
15
     */
16
    public function setName($name)
17
    {
18
        $this->name = $name;
19
20
        return $this;
21
    }
22
23
    /**
24
     * Get name
25
     *
26
     * @return string
27
     */
28
    public function getName()
29
    {
30
        return $this->name;
31
    }
32
}
33