SecurityPart   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 17
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parseSecurity() 0 3 1
A getSecurity() 0 3 1
1
<?php
2
namespace gossi\swagger\parts;
3
4
use phootwork\collection\Map;
5
use gossi\swagger\collections\SecurityRequirements;
6
7
trait SecurityPart {
8
9
	/** @var SecurityRequirements */
10
	private $security;
11 9
12 9
	private function parseSecurity(Map $data) {
13 9
		$this->security = new SecurityRequirements($data->get('security'));
14
	}
15
16
	/**
17
	 * @return SecurityRequirements
18
	 */
19
	public function getSecurity() {
20
		return $this->security;
21
	}
22
23
}
24