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

InvalidRelationPathException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
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