GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

WorkflowExpressionQuery::setOrderBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * @link https://github.com/old-town/old-town-workflow
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\Query;
7
8
/**
9
 * Interface WorkflowExpressionQuery
10
 *
11
 * @package OldTown\Workflow\Query
12
 */
13
class WorkflowExpressionQuery
14
{
15
    /**
16
     * Сортировка отсутствует
17
     *
18
     * @var integer
19
     */
20
    const SORT_NONE = 0;
21
22
    /**
23
     * Сортировка по возрастанию
24
     *
25
     * @var integer
26
     */
27
    const SORT_ASC = 1;
28
29
    /**
30
     * Сортировка по убыванию
31
     *
32
     * @var integer
33
     */
34
    const SORT_DESC = -1;
35
36
    /**
37
     * @var AbstractExpression
38
     */
39
    private $expression;
40
41
    /**
42
     * @var integer
43
     */
44
    private $orderBy;
45
46
    /**
47
     * @var integer
48
     */
49
    private $sortOrder;
50
51
    /**
52
     * @param AbstractExpression $expression
53
     */
54 13
    public function __construct(AbstractExpression $expression = null)
55
    {
56 13
        if (null !== $expression) {
57 12
            $this->setExpression($expression);
58 12
        }
59 13
    }
60
61
    /**
62
     * @return AbstractExpression
63
     */
64 12
    public function getExpression()
65
    {
66 12
        return $this->expression;
67
    }
68
69
    /**
70
     * @param AbstractExpression $expression
71
     */
72 13
    public function setExpression(AbstractExpression $expression = null)
73
    {
74 13
        $this->expression = $expression;
75 13
    }
76
77
    /**
78
     * @return int
79
     */
80
    public function getOrderBy()
81
    {
82
        return $this->orderBy;
83
    }
84
85
    /**
86
     * @param int $orderBy
87
     * @return $this
88
     */
89
    public function setOrderBy($orderBy)
90
    {
91
        $this->orderBy = (integer)$orderBy;
92
93
        return $this;
94
    }
95
96
    /**
97
     * @return integer
98
     */
99
    public function getSortOrder()
100
    {
101
        return $this->sortOrder;
102
    }
103
104
    /**
105
     * @param integer $sortOrder
106
     * @return $this
107
     */
108
    public function setSortOrder($sortOrder)
109
    {
110
        $this->sortOrder = (integer)$sortOrder;
111
112
        return $this;
113
    }
114
}
115