Passed
Push — master ( ac21bd...36df2b )
by noitran
03:42
created

AbstractEvent::getModel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Noitran\Repositories\Events;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Noitran\Repositories\Contracts\Repository\RepositoryInterface;
7
8
abstract class AbstractEvent
9
{
10
    /**
11
     * @var RepositoryInterface
12
     */
13
    protected $repository;
14
15
    /**
16
     * @var Model
17
     */
18
    protected $model;
19
20
    /**
21
     * AbstractEvent constructor.
22
     *
23
     * @param RepositoryInterface $repository
24
     * @param Model $model
25
     */
26 5
    public function __construct(RepositoryInterface $repository, Model $model)
27
    {
28 5
        $this->repository = $repository;
29 5
        $this->model = $model;
30 5
    }
31
32
    /**
33
     * @return RepositoryInterface
34
     */
35
    public function getRepository(): RepositoryInterface
36
    {
37
        return $this->repository;
38
    }
39
40
    /**
41
     * @return Model
42
     */
43
    public function getModel(): Model
44
    {
45
        return $this->model;
46
    }
47
}
48