Passed
Push — related-record-fixes ( 29f78d )
by Alex
08:12
created

InvalidRelationPathException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
1
<?php
2
3
namespace Huntie\JsonApi\Exceptions;
4
5
use Exception;
6
7
class InvalidRelationPathException extends Exeption
8
{
9
    /**
10
     * Create a new InvalidRelationPathException instance.
11
     *
12
     * @param string         $path     The relation path attempted
13
     * @param int|null       $code     User defined exception code
14
     * @param Exception|null $previous Previous exception if nested
15
     */
16
    public function __construct($path, $code = 0, Exception $previous = null)
17
    {
18
        $message = sprintf('The relationship path "%s" could not be resolved', $path);
19
20
        parent::__construct($message, $code, $previous);
21
    }
22
}
23