Completed
Push — master ( 819e89...46ea75 )
by Thomas
10:56
created

SchemaPart   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 60%

Importance

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

2 Methods

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