Completed
Pull Request — master (#68)
by Cristiano
05:36
created

FinalPart   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 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
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the php-code-generator package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @license Apache-2.0
8
 */
9
10
namespace gossi\codegen\model\parts;
11
12
/**
13
 * Abstract Part
14
 *
15
 * Keeps track if the model has a final modifier or not
16
 *
17
 * @author Thomas Gossmann
18
 */
19
trait FinalPart {
20
21
	/** @var bool */
22
	private bool $final = false;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
23 23
24 23
	/**
25
	 * Returns whether this is final
26
	 *
27
	 * @return bool `true` for final and `false` if not
28
	 */
29
	public function isFinal(): bool {
30
		return $this->final;
31
	}
32
33 17
	/**
34 17
	 * Sets this final
35
	 *
36 17
	 * @param bool $final `true` for final and `false` if not
37
	 *
38
	 * @return $this
39
	 */
40
	public function setFinal(bool $final): self {
41
		$this->final = $final;
42
43
		return $this;
44
	}
45
}
46