GeneralErrorHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: afshin
5
 * Date: 11/20/17
6
 * Time: 6:55 PM
7
 */
8
9
namespace Core\Handlers;
10
11
12
use Core\Interfaces\_ErrorHandler;
13
14
class GeneralErrorHandler extends _ErrorHandler
15
{
16
    public function __invoke($request, $response, $exception) {
17
        return $response
18
            ->withStatus(500)
19
            ->withHeader('Content-Type', 'text/html')
20
            ->write('Something went wrong!');
21
    }
22
}
23
24