NamePart   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 5 1
A getName() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace gossi\codegen\model\parts;
5
6
/**
7
 * Name part
8
 *
9
 * For all models that do have a name
10
 *
11
 * @author Thomas Gossmann
12
 */
13
trait NamePart {
14
15
	/** @var string */
16
	private $name;
17
18
	/**
19
	 * Sets the name
20
	 *
21
	 * @param string $name
22
	 * @return $this
23
	 */
24 81
	public function setName(string $name = null) {
25 81
		$this->name = $name;
26
27 81
		return $this;
28
	}
29
30
	/**
31
	 * Returns the name
32
	 *
33
	 * @return string
34
	 */
35 70
	public function getName(): ?string {
36 70
		return $this->name;
37
	}
38
}
39