Storage   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 24
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
A __construct() 0 7 3
1
<?php
2
namespace SpareParts\Pillar\Mapper\Annotation;
3
4
use Doctrine\Common\Annotations\Annotation\Required;
5
6
/**
7
 * @Annotation
8
 */
9
class Storage implements IPillarAnnotation
10
{
11
	/**
12
	 * @var string
13
	 * @Required()
14
	 */
15
	protected $type;
16
17
	public function __construct($values)
18
	{
19
		if (isset($values['value'])) {
20
			$this->type = $values['value'];
21
		}
22
		if (isset($values['type'])) {
23
			$this->type = $values['type'];
24
		}
25
	}
26
27
	/**
28
	 * @return string
29
	 */
30
	public function getType()
31
	{
32
		return $this->type;
33
	}
34
}
35