Passed
Push — master ( b500c8...f1f1b3 )
by Hirofumi
05:29
created

LoadFailedException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A fileName() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shippinno\Template;
5
6
use Exception;
7
use Throwable;
8
9
class LoadFailedException extends Exception
10
{
11
    /**
12
     * @var string
13
     */
14
    private $fileName;
15
16
    /**
17
     * @param string $fileName
18
     */
19 1
    public function __construct(string $fileName)
20
    {
21 1
        $this->fileName = $fileName;
22 1
        parent::__construct(sprintf('Failed to load file: %s', $this->fileName()));
23 1
    }
24
25
    /**
26
     * @return string
27
     */
28 1
    public function fileName(): string
29
    {
30 1
        return $this->fileName;
31
    }
32
}
33