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

TransferFailedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 0
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 4
crap 2
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
 * @license https://github.com/graze/data-file/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/data-file
12
 */
13
14
namespace Graze\DataFile\Modify\Exception;
15
16
use Exception;
17
use Graze\DataFile\Node\FileNode;
18 2
19
class TransferFailedException extends Exception
20 2
{
21
    /**
22 2
     * MakeDirectoryFailedException constructor.
23 2
     *
24
     * @param FileNode  $from
25
     * @param FileNode  $to
26
     * @param string    $message
27
     * @param Exception $previous
0 ignored issues
show
Documentation introduced by
Should the type for parameter $previous not be null|Exception?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
28
     */
29
    public function __construct(FileNode $from, FileNode $to, $message = '', Exception $previous = null)
30
    {
31
        $message = "Failed to transfer file: $from to $to. " . $message;
32
33
        parent::__construct($message, 0, $previous);
34
    }
35
}
36