Completed
Push — master ( ce62ef...a1e916 )
by Thomas
02:37
created

AbstractPart   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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