Passed
Push — master ( c89772...da5ca0 )
by Atanas
01:54
created

HasNameTrait::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace WPEmerge\View;
4
5
trait HasNameTrait {
6
	/**
7
	 * Name.
8
	 *
9
	 * @var string
10
	 */
11
	protected $name = '';
12
13
	/**
14
	 * Get name.
15
	 *
16
	 * @return string
17
	 */
18
	public function getName() {
19
		return $this->name;
20
	}
21
22
	/**
23
	 * Set name.
24
	 *
25
	 * @param  string $name
26
	 * @return self   $this
27
	 */
28
	public function setName( $name ) {
29
		$this->name = $name;
30
		return $this;
31
	}
32
}
33