Sorting::getDirection()   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\Assistant\Dibi\Sorting;
3
4
class Sorting implements ISorting
5
{
6
	/**
7
	 * @var string
8
	 */
9
	private $property;
10
11
	/**
12
	 * @var SortingDirectionEnum
13
	 */
14
	private $direction;
15
16
	/**
17
	 * @param string $property
18
	 * @param SortingDirectionEnum $direction
19
	 */
20
	public function __construct($property, SortingDirectionEnum $direction)
21
	{
22
		$this->property = $property;
23
		$this->direction = $direction;
24
	}
25
26
	/**
27
	 * @return string
28
	 */
29
	public function getProperty()
30
	{
31
		return $this->property;
32
	}
33
34
	/**
35
	 * @return SortingDirectionEnum
36
	 */
37
	public function getDirection()
38
	{
39
		return $this->direction;
40
	}
41
}
42