NodeRepository::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace PHPHub\Repositories\Eloquent;
4
5
use Prettus\Repository\Criteria\RequestCriteria;
6
use PHPHub\Repositories\NodeRepositoryInterface;
7
use PHPHub\Node;
8
9
/**
10
 * Class NodeRepositoryEloquent.
11
 */
12
class NodeRepository extends BaseRepository implements NodeRepositoryInterface
13
{
14
    /**
15
     * Specify Model class name.
16
     *
17
     * @return string
18
     */
19
    public function model()
20
    {
21
        return Node::class;
22
    }
23
24
    /**
25
     * Boot up the repository, pushing criteria.
26
     */
27
    public function boot()
28
    {
29
        $this->pushCriteria(app(RequestCriteria::class));
30
    }
31
}
32