UnarchiveException::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 3
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace League\Emoji\Exception;
6
7
use Throwable;
8
9
class UnarchiveException extends \RuntimeException implements EmojiException
10
{
11 9
    public function __construct(string $filename, ?string $message = null, ?Throwable $previous = null)
12
    {
13 9
        if (! isset($message)) {
14 3
            $message = \sprintf('Empty or corrupted archive: %s.', $filename);
15
        }
16
17 9
        parent::__construct($message, 0, $previous);
18 9
    }
19
}
20