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

ReferenceReturnPart   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
 * Reference return part
14
 *
15
 * Keeps track whether the return value is a reference or not
16
 *
17
 * @author Thomas Gossmann
18
 */
19
trait ReferenceReturnPart {
20
21
	/** @var bool */
22
	private bool $referenceReturned = 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
24 11
	/**
25 11
	 * Set true if a reference is returned of false if not
26
	 *
27 11
	 * @param bool $referenceReturned
28
	 *
29
	 * @return $this
30
	 */
31
	public function setReferenceReturned(bool $referenceReturned): self {
32
		$this->referenceReturned = $referenceReturned;
33
34
		return $this;
35 17
	}
36 17
37
	/**
38
	 * Returns whether a reference is returned
39
	 *
40
	 * @return bool
41
	 */
42
	public function isReferenceReturned(): bool {
43
		return $this->referenceReturned;
44
	}
45
}
46