Completed
Push — master ( caff19...219001 )
by Julien
08:25
created

ConnectionErrorEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getError() 0 4 1
1
<?php
2
3
namespace Eole\Sandstone\Websocket\Event;
4
5
use Ratchet\ConnectionInterface;
6
7
class ConnectionErrorEvent extends ConnectionEvent
8
{
9
    /**
10
     * @var \Exception
11
     */
12
    private $error;
13
14
    /**
15
     * @param ConnectionInterface $conn
16
     * @param \Exception $error
17
     */
18
    public function __construct(ConnectionInterface $conn, \Exception $error)
19
    {
20
        parent::__construct($conn);
21
22
        $this->error = $error;
23
    }
24
25
    /**
26
     * @return ConnectionInterface
27
     */
28
    public function getError()
29
    {
30
        return $this->error;
31
    }
32
}
33