AdminUserRepositoryEloquent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 3 1
A presenter() 0 3 1
A validator() 0 3 1
A model() 0 3 1
1
<?php
2
3
namespace Yeelight\Repositories\Eloquent;
4
5
use Yeelight\Models\AdminUser;
6
use Yeelight\Presenters\AdminUserPresenter;
7
use Yeelight\Repositories\Criteria\RequestCriteria;
8
use Yeelight\Repositories\Interfaces\AdminUserRepository;
9
use Yeelight\Validators\AdminUserValidator;
10
11
/**
12
 * Class AdminUserRepositoryEloquent
13
 *
14
 * @category Yeelight
15
 *
16
 * @package Yeelight\Repositories\Eloquent
17
 *
18
 * @author Sheldon Lee <[email protected]>
19
 *
20
 * @license https://opensource.org/licenses/MIT MIT
21
 *
22
 * @link https://www.yeelight.com
23
 */
24
class AdminUserRepositoryEloquent
25
    extends BaseRepository
26
    implements AdminUserRepository
27
{
28
    /**
29
     * Specify Model class name.
30
     *
31
     * @return string
32
     */
33
    public function model()
34
    {
35
        return AdminUser::class;
36
    }
37
38
    /**
39
     * Specify Validator class name.
40
     *
41
     * @return mixed
42
     */
43
    public function validator()
44
    {
45
        return AdminUserValidator::class;
46
    }
47
48
    /**
49
     * Specify Presenter class name.
50
     *
51
     * @return mixed
52
     */
53
    public function presenter()
54
    {
55
        return AdminUserPresenter::class;
56
    }
57
58
    /**
59
     * Boot up the repository, pushing criteria.
60
     */
61
    public function boot()
62
    {
63
        $this->pushCriteria(app(RequestCriteria::class));
64
    }
65
}
66