Completed
Pull Request — master (#3)
by Harry
07:29
created

CopyFailedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 17
ccs 0
cts 0
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * This file is part of graze/data-file
4
 *
5
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10 1
 * @license https://github.com/graze/data-file/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/data-file
12 1
 */
13
14 1
namespace Graze\DataFile\Modify\Exception;
15 1
16
use Exception;
17
use Graze\DataFile\Node\FileNodeInterface;
18
19
class CopyFailedException extends Exception
20
{
21
    /**
22
     * CopyFailedException constructor.
23
     *
24
     * @param FileNodeInterface $fromFile
25
     * @param int               $newPath
26
     * @param string            $message
27
     * @param Exception|null    $previous
28
     */
29
    public function __construct(FileNodeInterface $fromFile, $newPath, $message = '', Exception $previous = null)
30
    {
31
        $message = "Failed to copy file from: '$fromFile' to '$newPath'. " . $message;
32
33
        parent::__construct($message, 0, $previous);
34
    }
35
}
36