Completed
Push — master ( 522585...279d2c )
by Harry
04:14
created

MakeDirectoryFailedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Graze\DataFile\Modify\Exception;
4
5
use Exception;
6
use Graze\DataFile\Node\FileNodeInterface;
7
8
class MakeDirectoryFailedException extends Exception
9
{
10
    /**
11
     * MakeDirectoryFailedException constructor.
12
     *
13
     * @param FileNodeInterface $file
14
     * @param string            $message
15
     * @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...
16
     */
17 1
    public function __construct(FileNodeInterface $file, $message = '', Exception $previous = null)
18
    {
19 1
        $message = "Failed to create directory: '{$file->getDirectory()}'. " . $message;
20
21 1
        parent::__construct($message, 0, $previous);
22 1
    }
23
}
24