OrderBy::resetOrderBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Sirius\Sql\Clause;
5
6
use Sirius\Sql\Component\By;
7
8
trait OrderBy
9
{
10
    protected $orderBy;
11
12 1
    public function orderBy(string $expr, string ...$exprs)
13
    {
14 1
        $this->orderBy->expr($expr, ...$exprs);
15
16 1
        return $this;
17
    }
18
19 19
    public function resetOrderBy()
20
    {
21 19
        $this->orderBy = new By('ORDER');
22
23 19
        return $this;
24
    }
25
}
26