MethodNotAllowedException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 4
crap 1
1
<?php
2
3
namespace Mosaic\Routing\Exceptions;
4
5
use Throwable;
6
7
class MethodNotAllowedException extends HttpException
8
{
9
    /**
10
     * @param string[]       $methods
11
     * @param int            $status
12
     * @param int            $code
13
     * @param Throwable|null $previous
14
     */
15 1
    public function __construct($methods, $status = 500, $code = 0, Throwable $previous = null)
16
    {
17 1
        $message = 'Method ' . '[' . implode($methods, ', ') . '] is not allowed';
18 1
        parent::__construct($message, $status, $code, $previous);
19 1
    }
20
}
21