Passed
Push — main ( d61a4b...a3ea10 )
by Oscar
12:17
created

Html5Exception::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
/*
4
 * This file is part of ocubom/twig-svg-extension
5
 *
6
 * © Oscar Cubo Medina <https://ocubom.github.io>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ocubom\Twig\Extension\Svg\Exception;
13
14
use Ocubom\Twig\Extension\Svg\Util\AggregatedExceptionTrait;
15
16
class Html5Exception extends RuntimeException
17
{
18
    use AggregatedExceptionTrait;
19
20
    /**
21
     * @param \Throwable|iterable<\Throwable> $previous
22
     */
23 1
    public function __construct(string $message = null, int $code = 0, $previous = null)
24
    {
25 1
        parent::__construct(
26 1
            $this->formatMessage($message ?? 'Generated %d %s parsing HTML5', $previous),
27 1
            $code
28 1
        );
29
    }
30
}
31