Storage::getType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
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