Completed
Push — master ( 45b50c...f7bb89 )
by Maxime
11s
created

SimpleMessageHandler::onDisconnect()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * This file is a part of Woketo package.
4
 *
5
 * (c) Nekland <[email protected]>
6
 *
7
 * For the full license, take a look to the LICENSE file
8
 * on the root directory of this project
9
 */
10
11
namespace Nekland\Woketo\Message;
12
13
14
use Nekland\Woketo\Core\AbstractConnection;
15
use Nekland\Woketo\Exception\WebsocketException;
16
17
abstract class SimpleMessageHandler implements MessageHandlerInterface
18
{
19 1
    public function onConnection(AbstractConnection $connection)
20
    {
21
        // Doing nothing
22 1
    }
23
24 1
    public function onError(WebsocketException $e, AbstractConnection $connection)
25
    {
26 1
        echo 'An error occurred : ' . $e->getMessage();
27 1
    }
28
29 1
    public function onDisconnect(AbstractConnection $connection)
30
    {
31
        // Doing nothing
32 1
    }
33
}
34