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

UrlPart   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 3
c 2
b 1
f 0
lcom 1
cbo 1
dl 0
loc 28
ccs 8
cts 8
cp 1
rs 10
1
<?php
2
namespace gossi\swagger\parts;
3
4
use gossi\swagger\util\MergeHelper;
5
use phootwork\collection\Map;
6
7
trait UrlPart {
8
9
	/** @var string */
10
	private $url;
11 12
12 12
	private function parseUrl(Map $data) {
13 12
		$this->url = $data->get('url');
14
	}
15
16
	private function mergeUrl(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...
17
		MergeHelper::mergeFields($this->url, $model->url, $overwrite);
18
	}
19 1
20 1
	/**
21
	 *
22
	 * @return string
23
	 */
24
	public function getUrl() {
25
		return $this->url;
26
	}
27
28 1
	/**
29 1
	 *
30 1
	 * @param string $url
31
	 * @return $this
32
	 */
33
	public function setUrl($url) {
34
		$this->url = $url;
35
		return $this;
36
	}
37
38
}
39