Completed
Push — last-modified-feature ( 83af24 )
by Richan
13:28
created

ModelHasUpdated   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 31
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A model() 0 4 1
1
<?php
2
3
namespace RichanFongdasen\Varnishable\Events;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Queue\SerializesModels;
7
8
class ModelHasUpdated
9
{
10
    use SerializesModels;
11
12
    /**
13
     * Eloquent model object.
14
     *
15
     * @var \Illuminate\Database\Eloquent\Model
16
     */
17
    protected $model;
18
19
    /**
20
     * Event constructor.
21
     *
22
     * @param \Illuminate\Database\Eloquent\Model $model
23
     */
24
    public function __construct(Model $model)
25
    {
26
        $this->model = $model;
27
    }
28
29
    /**
30
     * Model accessor.
31
     *
32
     * @return Illuminate\Database\Eloquent\Model
0 ignored issues
show
Documentation introduced by
Should the return type not be Model?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
33
     */
34
    public function model()
35
    {
36
        return $this->model;
37
    }
38
}
39