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

MakeDirectoryFailedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 16
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\FileNodeInterface;
18
19
class MakeDirectoryFailedException extends Exception
20
{
21
    /**
22
     * MakeDirectoryFailedException constructor.
23
     *
24
     * @param FileNodeInterface $file
25
     * @param string            $message
26
     * @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...
27
     */
28 1
    public function __construct(FileNodeInterface $file, $message = '', Exception $previous = null)
29
    {
30 1
        $message = "Failed to create directory: '{$file->getDirectory()}'. " . $message;
31
32 1
        parent::__construct($message, 0, $previous);
33 1
    }
34
}
35