InvalidListenerException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 18
rs 10
ccs 0
cts 8
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php declare(strict_types = 1);
2
3
namespace Venta\Event\Exception;
4
5
use InvalidArgumentException;
6
use Throwable;
7
8
/**
9
 * Class InvalidListenerException
10
 *
11
 * @package Venta\Event\Exception
12
 */
13
class InvalidListenerException extends InvalidArgumentException
14
{
15
    /**
16
     * Construct function.
17
     *
18
     * @param $listener
19
     * @param Throwable|null $previous
20
     */
21
    public function __construct($listener, Throwable $previous = null)
22
    {
23
        parent::__construct(
24
            sprintf('Callable expected, got %s', is_object($listener) ? get_class($listener) : gettype($listener)),
25
            0,
26
            $previous
27
        );
28
    }
29
30
}