Completed
Push — master ( 011068...5fe610 )
by Manel
02:30
created

CycleRepositoryEloquent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

3 Methods

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