TagAdded   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace Conner\Tagging\Events;
4
5
use Conner\Tagging\Model\Tagged;
6
use Conner\Tagging\Taggable;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Database\Eloquent\Model;
9
10
class TagAdded
11
{
12
    use SerializesModels;
0 ignored issues
show
introduced by Robert Conner
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Conner\Tagging\Events\TagAdded: $id, $relations, $class, $connection, $keyBy
Loading history...
13
14
    /** @var Taggable|Model **/
15
    public $model;
16
17
    /** @var string */
18
    public $tagSlug;
19
20
    /** @var Tagged */
21
    public $tagged;
22
23
    /**
24
     * Create a new event instance.
25
     *
26
     * @param Taggable|Model $model
27
     * @param string $tagSlug
28
     * @param Tagged $tagged
29
     */
30
    public function __construct($model, string $tagSlug, Tagged $tagged)
31
    {
32
        $this->model = $model;
33
        $this->tagSlug = $tagSlug;
34
        $this->tagged = $tagged;
35
    }
36
}