HasNameTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
eloc 5
c 2
b 1
f 1
dl 0
loc 26
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 2 1
A setName() 0 3 1
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