Completed
Pull Request — master (#447)
by Marcel
03:21 queued 01:37
created

NullStatisticsLogger   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 83
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 83
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A webSocketMessage() 0 4 1
A apiMessage() 0 4 1
A connection() 0 4 1
A disconnection() 0 4 1
A save() 0 4 1
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\Statistics\Logger;
4
5
use BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver;
6
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
7
8
class NullStatisticsLogger implements StatisticsLogger
9
{
10
    /**
11
     * The Channel manager.
12
     *
13
     * @var \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager
14
     */
15
    protected $channelManager;
16
17
    /**
18
     * The statistics driver instance.
19
     *
20
     * @var \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver
21
     */
22
    protected $driver;
23
24
    /**
25
     * Initialize the logger.
26
     *
27
     * @param  \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager  $channelManager
28
     * @param  \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver  $driver
29
     * @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...
30
     */
31
    public function __construct(ChannelManager $channelManager, StatisticsDriver $driver)
32
    {
33
        $this->channelManager = $channelManager;
34
        $this->driver = $driver;
35
    }
36
37
    /**
38
     * Handle the incoming websocket message.
39
     *
40
     * @param  mixed  $appId
41
     * @return void
42
     */
43
    public function webSocketMessage($appId)
44
    {
45
        //
46
    }
47
48
    /**
49
     * Handle the incoming API message.
50
     *
51
     * @param  mixed  $appId
52
     * @return void
53
     */
54
    public function apiMessage($appId)
55
    {
56
        //
57
    }
58
59
    /**
60
     * Handle the new conection.
61
     *
62
     * @param  mixed  $appId
63
     * @return void
64
     */
65
    public function connection($appId)
66
    {
67
        //
68
    }
69
70
    /**
71
     * Handle disconnections.
72
     *
73
     * @param  mixed  $appId
74
     * @return void
75
     */
76
    public function disconnection($appId)
77
    {
78
        //
79
    }
80
81
    /**
82
     * Save all the stored statistics.
83
     *
84
     * @return void
85
     */
86
    public function save()
87
    {
88
        //
89
    }
90
}
91