BodyPart   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 setBody() 0 5 1
A getBody() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace gossi\codegen\model\parts;
5
6
/**
7
 * Body Part
8
 *
9
 * For all models that do have a code body
10
 *
11
 * @author Thomas Gossmann
12
 */
13
trait BodyPart {
14
15
	/** @var string */
16
	private $body = '';
17
18
	/**
19
	 * Sets the body for this
20
	 *
21
	 * @param string $body
22
	 * @return $this
23
	 */
24 2
	public function setBody(string $body) {
25 2
		$this->body = $body;
26
27 2
		return $this;
28
	}
29
30
	/**
31
	 * Returns the body
32
	 *
33
	 * @return string
34
	 */
35 17
	public function getBody(): string {
36 17
		return $this->body;
37
	}
38
}
39