Completed
Pull Request — master (#3)
by Harry
03:17
created

TransferFailedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 17
ccs 4
cts 4
cp 1
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
 * @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
19
class TransferFailedException extends Exception
20
{
21
    /**
22
     * MakeDirectoryFailedException constructor.
23
     *
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 2
    public function __construct(FileNode $from, FileNode $to, $message = '', Exception $previous = null)
30
    {
31 2
        $message = "Failed to transfer file: $from to $to. " . $message;
32
33 2
        parent::__construct($message, 0, $previous);
34 2
    }
35
}
36