MethodNotAllowedException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 1
c 2
b 0
f 0
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 4
crap 1
1
<?php declare(strict_types=1);
2
3
namespace Phact\Router\Exception;
4
5
use Throwable;
6
7
/**
8
 * Will thrown if method not allowed for requested route
9
 *
10
 * Class MethodNotAllowedException
11
 * @package Phact\Router\Exception
12
 */
13
class MethodNotAllowedException extends HttpException
14
{
15 1
    public function __construct(
16
        array $allowed = [],
17
        $message = 'Method Not Allowed',
18
        $code = 0,
19
        Throwable $previous = null
20
    ) {
21 1
        parent::__construct(405, $message, $code, $previous);
22 1
    }
23
}
24