Completed
Pull Request — develop (#337)
by Bastian
06:24
created

InvalidJsonPatchException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
/**
3
 * InvalidJsonPatchException exception class
4
 */
5
6
namespace Graviton\ExceptionBundle\Exception;
7
8
use Symfony\Component\HttpFoundation\Response;
9
10
/**
11
 * InvalidJsonPatchException exception class
12
 *
13
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
14
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
15
 * @link     http://swisscom.ch
16
 */
17
final class InvalidJsonPatchException extends RestException
18
{
19
    /**
20
     * Constructor
21
     *
22
     * @param string     $message Error message
23
     * @param \Exception $prev    Previous Exception
24
     */
25 4
    public function __construct($message = "Invalid JSON Patch", $prev = null)
26
    {
27 4
        parent::__construct(Response::HTTP_BAD_REQUEST, $message, $prev);
28 4
    }
29
}
30