Completed
Push — master ( 870cb1...1f9632 )
by Milroy
07:07 queued 05:53
created

SortField   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 27
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getField() 0 4 1
A getDirection() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sarala\Query;
6
7
class SortField
8
{
9
    const SORT_ASCENDING = 'asc';
10
    const SORT_DESCENDING = 'desc';
11
12
    /** @var string */
13
    private $field;
14
15
    /** @var string */
16
    private $direction;
17
18
    public function __construct(string $field, string $direction)
19
    {
20
        $this->field = $field;
21
        $this->direction = $direction;
22
    }
23
24
    public function getField(): string
25
    {
26
        return $this->field;
27
    }
28
29
    public function getDirection(): string
30
    {
31
        return $this->direction;
32
    }
33
}
34