MethodNotAllowed   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 19
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getResponseCode() 0 4 1
1
<?php
2
3
namespace GFG\Hek\Exceptions;
4
5
class MethodNotAllowed extends \InvalidArgumentException implements ResponseInterface
6
{
7
    /**
8
     * @param string $methodName
9
     */
10 2
    public function __construct($methodName)
11
    {
12 2
        $message = sprintf('Method %s not allowed', $methodName);
13 2
        parent::__construct($message);
14 2
    }
15
16
    /**
17
     * {@inheritdoc}
18
     */
19 2
    public function getResponseCode()
20
    {
21 2
        return 405;
22
    }
23
}
24