| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 4 | public function __construct( |
|
| 17 | string $message = 'An error occurred', |
||
| 18 | int $code = 400, |
||
| 19 | int $status = 400, |
||
| 20 | array $headers = [], |
||
| 21 | int $options = 0 |
||
| 22 | ) { |
||
| 23 | 4 | $this->content = [ |
|
| 24 | 4 | 'status' => $status, |
|
| 25 | 'error' => [ |
||
| 26 | 4 | 'code' => $code, |
|
| 27 | 4 | 'message' => $message, |
|
| 28 | ], |
||
| 29 | ]; |
||
| 30 | |||
| 31 | 4 | $this->status = $status; |
|
| 32 | 4 | $this->headers = $headers; |
|
| 33 | 4 | $this->options = $options; |
|
| 34 | 4 | } |
|
| 41 |