CommentAdded   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
dl 0
loc 14
rs 10
c 3
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace WebDevEtc\BlogEtc\Events;
4
5
use Illuminate\Foundation\Events\Dispatchable;
6
use Illuminate\Queue\SerializesModels;
7
use WebDevEtc\BlogEtc\Models\Comment;
8
use WebDevEtc\BlogEtc\Models\Post;
9
10
/**
11
 * Class CommentAdded.
12
 */
13
class CommentAdded
14
{
15
    use Dispatchable;
16
    use SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by WebDevEtc\BlogEtc\Events\CommentAdded: $id, $relations, $class, $connection, $keyBy
Loading history...
17
18
    /** @var Post */
19
    public $blogEtcPost;
20
    /** @var Comment */
21
    public $newComment;
22
23
    public function __construct(Post $post, Comment $newComment)
24
    {
25
        $this->blogEtcPost = $post;
26
        $this->newComment = $newComment;
27
    }
28
}
29