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

BodyPart   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
 * Body Part
14
 *
15
 * For all models that do have a code body
16
 *
17
 * @author Thomas Gossmann
18
 */
19
trait BodyPart {
20
21
	/** @var string */
22
	private string $body = '';
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 2
	/**
25 2
	 * Sets the body for this
26
	 *
27 2
	 * @param string $body
28
	 *
29
	 * @return $this
30
	 */
31
	public function setBody(string $body): self {
32
		$this->body = $body;
33
34
		return $this;
35 17
	}
36 17
37
	/**
38
	 * Returns the body
39
	 *
40
	 * @return string
41
	 */
42
	public function getBody(): string {
43
		return $this->body;
44
	}
45
}
46