Completed
Pull Request — master (#6)
by Guilh
04:05
created

ResponsesPart   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 2
c 3
b 1
f 0
lcom 1
cbo 2
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10
1
<?php
2
namespace gossi\swagger\parts;
3
4
use gossi\swagger\collections\Responses;
5
use gossi\swagger\util\MergeHelper;
6
use phootwork\collection\Map;
7
8
trait ResponsesPart {
9
10
	/** @var Responses */
11
	private $responses;
12 12
13 12
	private function parseResponses(Map $data) {
14 12
		$this->responses = new Responses($data->get('responses', new Map()));
15
	}
16
17
	private function mergeResponses(static $model, $overwrite = 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_STATIC, expecting T_VARIABLE
Loading history...
18
		$this->responses->merge($model->responses, $overwrite);
19
	}
20
21 2
	/**
22 2
	 * Return responses
23
	 *
24
	 * @return Responses
25
	 */
26
	public function getResponses() {
27
		return $this->responses;
28
	}
29
30
}
31