Passed
Push — testing ( a7098f...bdd682 )
by Alex
04:35
created

InvalidRelationPathException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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