InventoryRepositoryEloquent::validator()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Scool\Inventory\Repositories;
4
5
use Prettus\Repository\Criteria\RequestCriteria;
6
use Prettus\Repository\Eloquent\BaseRepository;
7
8
/**
9
 * Class InventoryRepositoryEloquent.
10
 */
11
class InventoryRepositoryEloquent extends BaseRepository implements InventoryRepository
12
{
13
    /**
14
     * Specify Model class name.
15
     *
16
     * @return string
17
     */
18
    public function model()
19
    {
20
        return Inventory::class;
21
    }
22
23
    /**
24
     * Specify Validator class name.
25
     *
26
     * @return mixed
27
     */
28
    public function validator()
29
    {
30
        return InventoryValidator::class;
31
    }
32
33
    /**
34
     * Boot up the repository, pushing criteria.
35
     */
36
    public function boot()
37
    {
38
        $this->pushCriteria(app(RequestCriteria::class));
39
    }
40
}
41