InventoryRepositoryEloquent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 3
c 2
b 1
f 1
lcom 0
cbo 0
dl 0
loc 30
rs 10
ccs 0
cts 12
cp 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A validator() 0 4 1
A model() 0 4 1
A boot() 0 4 1
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