Completed
Pull Request — master (#9)
by Jacob
02:56
created

SecurityPart::setSecurity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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