OrderBy   A
last analyzed

Complexity

Total Complexity 31

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
dl 0
loc 17
wmc 31
lcom 1
cbo 0
ccs 5
cts 5
cp 1
rs 9.8

2 Methods

Rating   Name   Duplication   Size   Complexity  
A orderBy() 0 6 1
A buildOrderBy() 0 4 1
1
<?php
2
3
namespace Muffin\Queries\Snippets\Builders;
4
5
use Muffin\Queries\Snippets;
6
7
trait OrderBy
8
{
9
    protected
10
        $orderBy;
11
12 4
    public function orderBy($column, $directrion = Snippets\OrderBy::ASC)
0 ignored issues
show
Best Practice introduced by
Using PHP4-style constructors that are named like the class is not recommend; better use the more explicit __construct method.
Loading history...
13
    {
14 4
        $this->orderBy->addOrderBy($column, $directrion);
15
16 4
        return $this;
17
    }
18
19 30
    private function buildOrderBy()
20
    {
21 30
        return $this->orderBy->toString();
22
    }
23
}
24