Passed
Push — master ( 4aed4d...8895e9 )
by Maxime
06:43
created

MethodNotAllowedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php
2
3
namespace Piface\Router\Exception;
4
5
use Throwable;
6
7
class MethodNotAllowedException extends \RuntimeException
8
{
9
    public function __construct(array $allow, string $path, int $code = 0, Throwable $previous = null)
10
    {
11
        $message = sprintf("No route found for '%s'. Method not allowed (Allow: %s)", $path, implode(',', $allow));
12
        parent::__construct($message, $code, $previous);
13
    }
14
}
15