Completed
Pull Request — master (#447)
by Alexandru
01:56
created

MessagesBroadcasted   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\Events;
4
5
use Illuminate\Foundation\Events\Dispatchable;
6
use Illuminate\Queue\SerializesModels;
7
use Ratchet\ConnectionInterface;
8
9
class MessagesBroadcasted
10
{
11
    use Dispatchable, SerializesModels;
12
13
    /**
14
     * The amount of messages sent.
15
     *
16
     * @var int
17
     */
18
    protected $sentMessagesCount;
19
20
    /**
21
     * Initialize the event.
22
     *
23
     * @param  int  $sentMessagesCount
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(int $sentMessagesCount = 0)
27
    {
28
        $this->sentMessagesCount = $sentMessagesCount;
29
    }
30
}
31