Completed
Pull Request — master (#68)
by Cristiano
05:36
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 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 an abstract modifier or not
16
 *
17
 * @author Thomas Gossmann
18
 */
19
trait AbstractPart {
20
21
	/** @var bool */
22
	private bool $abstract = 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 abstract
26
	 *
27
	 * @return bool `true` for abstract and `false` if not
28
	 */
29
	public function isAbstract(): bool {
30
		return $this->abstract;
31
	}
32
33 18
	/**
34 18
	 * Sets this to abstract
35
	 *
36 18
	 * @param bool $abstract `true` for abstract and `false` if not
37
	 *
38
	 * @return $this
39
	 */
40
	public function setAbstract(bool $abstract): self {
41
		$this->abstract = $abstract;
42
43
		return $this;
44
	}
45
}
46