NewThread   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getThread() 0 4 1
A __construct() 0 4 1
A broadcastOn() 0 4 1
1
<?php
2
3
namespace Seongbae\Discuss\Events;
4
5
use Illuminate\Broadcasting\Channel;
6
use Illuminate\Queue\SerializesModels;
7
use Illuminate\Broadcasting\PrivateChannel;
8
use Illuminate\Broadcasting\PresenceChannel;
9
use Illuminate\Broadcasting\InteractsWithSockets;
10
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
11
use Seongbae\Discuss\Models\Reply;
12
13
class NewThread
14
{
15
    private $thread;
16
17
    use InteractsWithSockets, SerializesModels;
18
19
    public function getThread()
20
    {
21
        return $this->thread;
22
    }
23
24
    /**
25
     * Create a new event instance.
26
     * ClientAction constructor.
27
     * @param Client $client
0 ignored issues
show
Bug introduced by
There is no parameter named $client. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
28
     * @param $action
29
     */
30
    public function __construct($thread)
31
    {
32
        $this->thread = $thread;
33
    }
34
35
    /**
36
     * Get the channels the event should broadcast on.
37
     *
38
     * @return Channel|array
39
     */
40
    public function broadcastOn()
41
    {
42
        return new PrivateChannel('channel-name');
43
    }
44
}
45