Completed
Push — master ( 71cd39...d95db8 )
by Evan
15s
created

QueryBuilder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 19
rs 10
wmc 1
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
newQuery() 0 1 ?
A query() 0 4 1
1
<?php
2
3
namespace Silk\Query;
4
5
use Silk\Contracts\BuildsQueries;
6
7
trait QueryBuilder
8
{
9
    /**
10
     * Get a new query builder for the model.
11
     *
12
     * @return BuildsQueries
13
     */
14
    abstract public function newQuery();
15
16
    /**
17
     * Create a new query builder instance for this model type.
18
     *
19
     * @return BuildsQueries
20
     */
21
    public static function query()
22
    {
23
        return (new static)->newQuery();
24
    }
25
}
26