Passed
Push — master ( 774cb9...35b872 )
by Atanas
05:13
created

HasNameTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A setName() 0 4 1
1
<?php
2
3
namespace WPEmerge\View;
4
5
trait HasNameTrait {
6
	/**
7
	 * View name.
8
	 *
9
	 * @var string
10
	 */
11
	protected $name = '';
12
13
	/**
14
	 * {@inheritDoc}
15
	 */
16 1
	public function getName() {
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
17 1
		return $this->name;
18
	}
19
20
	/**
21
	 * {@inheritDoc}
22
	 */
23 1
	public function setName( $name ) {
24 1
		$this->name = $name;
25 1
		return $this;
26
	}
27
}
28