ReferenceReturnPart   A
last analyzed

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setReferenceReturned() 0 5 1
A isReferenceReturned() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace gossi\codegen\model\parts;
5
6
/**
7
 * Reference return part
8
 *
9
 * Keeps track whether the return value is a reference or not
10
 *
11
 * @author Thomas Gossmann
12
 */
13
trait ReferenceReturnPart {
14
15
	/** @var bool */
16
	private $referenceReturned = false;
17
18
	/**
19
	 * Set true if a reference is returned of false if not
20
	 *
21
	 * @param bool $referenceReturned
22
	 * @return $this
23
	 */
24 11
	public function setReferenceReturned(bool $referenceReturned) {
25 11
		$this->referenceReturned = $referenceReturned;
26
27 11
		return $this;
28
	}
29
30
	/**
31
	 * Returns whether a reference is returned
32
	 *
33
	 * @return bool
34
	 */
35 17
	public function isReferenceReturned(): bool {
36 17
		return $this->referenceReturned;
37
	}
38
}
39