Completed
Push — master ( 33fb86...144202 )
by Peter
07:30
created

NameAwareTrait::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * To change this license header, choose License Headers in Project Properties.
5
 * To change this template file, choose Tools | Templates
6
 * and open the template in the editor.
7
 */
8
9
namespace Maslosoft\Mangan\Traits;
10
11
use Maslosoft\Mangan\Interfaces\NameAwareInterface;
12
13
/**
14
 * Basic implementation of Name Aware Interface
15
 *
16
 * @see NameAwareInterface
17
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
18
 */
19
trait NameAwareTrait
20
{
21
22
	private $name = '';
23
24
	public function getName()
25
	{
26
		return $this->name;
27
	}
28
29
	public function setName($name)
30
	{
31
		$this->name = $name;
32
		return $this;
33
	}
34
35
}
36