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

ReferenceReturnPart::setReferenceReturned()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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