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

TargetFileExistsException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 35
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getTargetFilePath() 0 4 1
A getTemplateFilePath() 0 4 1
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