Failed Conditions
Pull Request — master (#1)
by Yo
01:56
created

TargetFileExistsException::getTemplateFilePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
namespace Yoanm\DefaultPhpRepository\Exception;
3
4
/**
5
 * Class Mode
6
 */
7
class TargetFileExistsException extends \Exception
8
{
9
    /** @var string */
10
    private $targetFilePath;
11
    /** @var string */
12
    private $templateFilePath;
13
14
    /**
15
     * @param string $targetFilePath
16
     * @param string $templateFilePath
17
     */
18
    public function __construct($targetFilePath, $templateFilePath)
19
    {
20
        parent::__construct(sprintf('"%s" already exists !', $targetFilePath));
21
22
        $this->targetFilePath = $targetFilePath;
23
        $this->templateFilePath = $templateFilePath;
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getTargetFilePath()
30
    {
31
        return $this->targetFilePath;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getTemplateFilePath()
38
    {
39
        return $this->templateFilePath;
40
    }
41
}
42