Obyx   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 5 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 Obyx
16
{
17
    use InteractsWithSockets, SerializesModels;
18
19
    public $reason;
20
    public $user_id;
21
22
    /**
23
     * Create a new event instance.
24
     */
25
    public function __construct($reason, $user_id)
26
    {
27
        $this->reason = $reason;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
28
        $this->user_id = $user_id;
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