Completed
Push — master ( df1f12...4872e5 )
by Lucas
05:42
created

InvalidJsonPatchException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 75%
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
ccs 3
cts 4
cp 0.75
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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
0 ignored issues
show
Documentation introduced by
Should the type for parameter $prev not be \Exception|null?

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...
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