LoadFailedException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shippinno\Template;
5
6
class LoadFailedException extends TemplateException
7
{
8
    /**
9
     * @var string
10
     */
11
    private $fileName;
12
13
    /**
14
     * @param string $fileName
15
     */
16 1
    public function __construct(string $fileName)
17
    {
18 1
        $this->fileName = $fileName;
19 1
        parent::__construct(sprintf('Failed to load file: %s', $this->fileName()));
20 1
    }
21
22
    /**
23
     * @return string
24
     */
25 1
    public function fileName(): string
26
    {
27 1
        return $this->fileName;
28
    }
29
}
30