GameView   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A broadcastOn() 0 4 1
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 GameView
16
{
17
    use InteractsWithSockets, SerializesModels;
18
19
    public $gameid;
20
21
    /**
22
     * Create a new event instance.
23
     *
24
     * @param $gameid
25
     */
26
    public function __construct($gameid)
27
    {
28
        $this->gameid = $gameid;
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