TagAdded   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 23
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\Database\Eloquent\Model;
8
use Illuminate\Queue\SerializesModels;
9
10
class TagAdded
11
{
12
    use SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Conner\Tagging\Events\TagAdded: $collectionClass, $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
     */
28
    public function __construct($model, string $tagSlug, Tagged $tagged)
29
    {
30
        $this->model = $model;
31
        $this->tagSlug = $tagSlug;
32
        $this->tagged = $tagged;
33
    }
34
}
35