Completed
Push — master ( ab9b64...d071e5 )
by Manu
02:02
created

InventoryRepositoryEloquent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A model() 0 4 1
A validator() 0 4 1
A boot() 0 4 1
1
<?php
2
namespace Scool\Inventory\Repositories;
3
use Prettus\Repository\Eloquent\BaseRepository;
4
use Prettus\Repository\Criteria\RequestCriteria;
5
use Scool\Inventory\Repositories\AttendanceRepository;
6
use Scool\Inventory\Models\Attendance;
7
use Scool\Inventory\Validators\AttendanceValidator;
8
/**
9
 * Class InventoryRepositoryEloquent
10
 * @package namespace App\Repositories;
11
 */
12
class InventoryRepositoryEloquent extends BaseRepository implements InventoryRepository
13
{
14
    /**
15
     * Specify Model class name
16
     *
17
     * @return string
18
     */
19
    public function model()
20
    {
21
        return Inventory::class;
22
    }
23
    /**
24
     * Specify Validator class name
25
     *
26
     * @return mixed
27
     */
28
    public function validator()
29
    {
30
        return InventoryValidator::class;
31
    }
32
    /**
33
     * Boot up the repository, pushing criteria
34
     */
35
    public function boot()
36
    {
37
        $this->pushCriteria(app(RequestCriteria::class));
38
    }
39
}