PostCreated   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A broadcastOn() 0 4 1
A __construct() 0 5 1
1
<?php namespace Taskforcedev\LaravelForum\Events;
2
3
use Illuminate\Queue\SerializesModels;
4
use Taskforcedev\LaravelForum\Models\ForumPost;
5
6
class PostCreated extends Event
7
{
8
    use SerializesModels;
9
10
    public $user;
11
    public $post;
12
13
    public function __construct(ForumPost $post, $user)
14
    {
15
        $this->post = $post;
16
        $this->user = $user;
17
    }
18
19
    /**
20
     * Get the channels the event should be broadcast on.
21
     *
22
     * @return array
23
     */
24
    public function broadcastOn()
25
    {
26
        return ['laravel-forum'];
27
    }
28
}
29