ActionConfigurationException::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 9
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
cc 2
nc 1
nop 2
crap 6
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LAG\AdminBundle\Exception\Action;
6
7
use LAG\AdminBundle\Exception\Exception;
8
9
class ActionConfigurationException extends Exception
10
{
11
    public function __construct(string $actionName, \Throwable $previous = null)
12
    {
13
        $message = sprintf(
14
            'The configuration of the action "%s" is not valid: %s',
15
            $actionName,
16
            $previous ? $previous->getMessage() : ''
17
        );
18
19
        parent::__construct($message, $previous?->getCode() ?? 0, $previous);
20
    }
21
}
22