HasNameTrait::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 1 Features 1
Metric Value
cc 1
eloc 1
c 2
b 1
f 1
nc 1
nop 0
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 * @package   WPEmerge
4
 * @author    Atanas Angelov <[email protected]>
5
 * @copyright 2017-2019 Atanas Angelov
6
 * @license   https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0
7
 * @link      https://wpemerge.com/
8
 */
9
10
namespace WPEmerge\View;
11
12
trait HasNameTrait {
13
	/**
14
	 * Name.
15
	 *
16
	 * @var string
17
	 */
18
	protected $name = '';
19
20
	/**
21
	 * Get name.
22
	 *
23
	 * @return string
24
	 */
25 1
	public function getName() {
26 1
		return $this->name;
27
	}
28
29
	/**
30
	 * Set name.
31
	 *
32
	 * @param  string $name
33
	 * @return static $this
34
	 */
35 1
	public function setName( $name ) {
36 1
		$this->name = $name;
37 1
		return $this;
38
	}
39
}
40