JsonException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace Core;
4
5
use Throwable;
6
7
/**
8
 * Custom error handeler for ajax / json errors.
9
 * this is intercepted in the Error class
10
 * When this is called, we return a json error with a code of 400 if in prod mode or we return the error in json format if in dev mode
11
 * Class JsonException
12
 * @package Core
13
 */
14
class JsonException extends \Exception
15
{
16
17
    public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
18
    {
19
        parent::__construct($message, $code, $previous);
20
    }
21
22
}