RepositoryEventBase   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 51
ccs 0
cts 17
cp 0
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getModel() 0 4 1
A getRepository() 0 4 1
A getAction() 0 4 1
1
<?php
2
/*
3
 * This file is part of the Laravel Platfourm package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\Platfourm\Repository\Events;
12
13
use Illuminate\Database\Eloquent\Model;
14
use Longman\Platfourm\Contracts\Repository\Repository;
15
16
/**
17
 * Class RepositoryEventBase.
18
 */
19
abstract class RepositoryEventBase
20
{
21
    /**
22
     * @var Model
23
     */
24
    protected $model;
25
26
    /**
27
     * @var Repository
28
     */
29
    protected $repository;
30
31
    /**
32
     * @var string
33
     */
34
    protected $action;
35
36
    /**
37
     * @param Repository $repository
38
     * @param Model      $model
39
     */
40
    public function __construct(Repository $repository, Model $model)
41
    {
42
        $this->repository = $repository;
43
        $this->model      = $model;
44
    }
45
46
    /**
47
     * @return Model
48
     */
49
    public function getModel()
50
    {
51
        return $this->model;
52
    }
53
54
    /**
55
     * @return Repository
56
     */
57
    public function getRepository()
58
    {
59
        return $this->repository;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getAction()
66
    {
67
        return $this->action;
68
    }
69
}
70