ErrorEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 60%

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 2
c 4
b 1
f 0
lcom 0
cbo 0
dl 0
loc 25
ccs 3
cts 5
cp 0.6
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getError() 0 4 1
1
<?php
2
/**
3
 * This file is part of the bee4/transport package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @copyright Bee4 2015
8
 * @author  Stephane HULARD <[email protected]>
9
 * @package Bee4\Transport\Events
10
 */
11
12
namespace Bee4\Transport\Events;
13
14
use Bee4\Events\EventInterface;
15
16
/**
17
 * Wrap error events
18
 * @package Bee4\Transport\Events
19
 */
20
class ErrorEvent implements EventInterface
21
{
22
    const ERROR = 'transport.error';
23
24
    /**
25
     * @var \Exception
26
     */
27
    protected $error;
28
29
    /**
30
     * @param \Exception $error
31
     */
32 1
    public function __construct(\Exception $error)
33
    {
34 1
        $this->error = $error;
35 1
    }
36
37
    /**
38
     * @return \Exception
39
     */
40
    public function getError()
41
    {
42
        return $this->error;
43
    }
44
}
45