TelegramNotification::broadcastOn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * rmarchiv.tk
5
 * (c) 2016-2017 by Marcel 'ryg' Hering
6
 */
7
8
namespace App\Events;
9
10
use Illuminate\Broadcasting\Channel;
11
use Illuminate\Queue\SerializesModels;
12
use Illuminate\Broadcasting\PrivateChannel;
13
use Illuminate\Broadcasting\InteractsWithSockets;
14
15
class TelegramNotification
16
{
17
    use InteractsWithSockets, SerializesModels;
18
19
    public $content;
20
21
    /**
22
     * Create a new event instance.
23
     *
24
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

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