AbstractPart   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 isAbstract() 0 3 1
A setAbstract() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace gossi\codegen\model\parts;
5
6
/**
7
 * Abstract Part
8
 *
9
 * Keeps track if the model has an abstract modifier or not
10
 *
11
 * @author Thomas Gossmann
12
 */
13
trait AbstractPart {
14
15
	/** @var bool */
16
	private $abstract = false;
17
18
	/**
19
	 * Returns whether this is abstract
20
	 *
21
	 * @return bool `true` for abstract and `false` if not
22
	 */
23 23
	public function isAbstract(): bool {
24 23
		return $this->abstract;
25
	}
26
27
	/**
28
	 * Sets this to abstract
29
	 *
30
	 * @param bool $abstract `true` for abstract and `false` if not
31
	 * @return $this
32
	 */
33 18
	public function setAbstract(bool $abstract) {
34 18
		$this->abstract = $abstract;
35
36 18
		return $this;
37
	}
38
}
39