Completed
Push — master ( e15c58...b150a8 )
by Changwan
07:08
created

InternalServerErrorException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
namespace Wandu\Http\Exception;
3
4
use Psr\Http\Message\ResponseInterface;
5
use Wandu\Http\Psr\Response;
6
7
class InternalServerErrorException extends HttpException
8
{
9
    /**
10
     * @param \Psr\Http\Message\ResponseInterface $response
11
     * @param array $attributes
12
     */
13 4
    public function __construct(
14
        ResponseInterface $response = null,
15
        array $attributes = []
16
    ) {
17 4
        $response = $response ?: new Response();
18 4
        parent::__construct($response->withStatus(500), $attributes);
19 4
    }
20
}
21