CommentAdded::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 2
b 0
f 0
cc 1
nc 1
nop 2
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