UrlPart::setUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace gossi\swagger\parts;
3
4
use phootwork\collection\Map;
5
6
trait UrlPart {
7
8
	/** @var string */
9
	private $url = false;
10
11 13
	private function parseUrl(Map $data) {
12 13
		$this->url = $data->get('url');
13 13
	}
14
15
	/**
16
	 *
17
	 * @return string
18
	 */
19 1
	public function getUrl() {
20 1
		return $this->url;
21
	}
22
23
	/**
24
	 *
25
	 * @param string $url
26
	 * @return $this
27
	 */
28 1
	public function setUrl($url) {
29 1
		$this->url = $url;
30 1
		return $this;
31
	}
32
33
}
34