OrderBy   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 18
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A orderBy() 0 6 1
A resetOrderBy() 0 6 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