Passed
Push — master ( 748bbc...6ff058 )
by Dominik
02:33
created

BadGateway::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\ApiHttp\ApiProblem\ServerError;
6
7
use Chubbyphp\ApiHttp\ApiProblem\AbstractApiProblem;
8
9
final class BadGateway extends AbstractApiProblem
10
{
11
    /**
12
     * @param string|null $detail
13
     * @param string|null $instance
14
     */
15 2
    public function __construct(string $detail = null, string $instance = null)
16
    {
17 2
        parent::__construct(
18 2
            'https://tools.ietf.org/html/rfc2616#section-10.5.3',
19 2
            502,
20 2
            'Bad Gateway',
21
            $detail,
22
            $instance
23
        );
24 2
    }
25
}
26