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

FinalPart::isFinal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace gossi\codegen\model\parts;
3
4
/**
5
 * Abstract Part
6
 *
7
 * Keeps track if the model has a final modifier or not
8
 *
9
 * @author Thomas Gossmann
10
 */
11
trait FinalPart {
12
13
	/** @var bool */
14
	private $final = false;
15
16
	/**
17
	 * Returns whether this is final
18
	 *
19
	 * @return bool `true` for final and `false` if not
20
	 */
21 12
	public function isFinal() {
22 12
		return $this->final;
23
	}
24
25
	/**
26
	 * Sets this final
27
	 *
28
	 * @param bool $bool `true` for final and `false` if not
29
	 * @return $this
30
	 */
31 12
	public function setFinal($bool) {
32 12
		$this->final = (boolean) $bool;
33
34 12
		return $this;
35
	}
36
}
37