Passed
Branch master (37a2f4)
by devosc
01:36
created

MethodNotAllowed   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 13
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Mvc5\Http\Error;
7
8
use Mvc5\Arg;
9
use Mvc5\Http\HttpError;
10
11
class MethodNotAllowed
12
    extends HttpError
13
{
14
    /**
15
     * @param array $config
16
     */
17 2
    function __construct(array $config = [])
1 ignored issue
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
18
    {
19 2
        parent::__construct($config + [
20 2
            Arg::DESCRIPTION => 'Unsupported resource request method.',
21
            Arg::ERRORS => [],
22
            Arg::MESSAGE => 'Method Not Allowed',
23
            Arg::STATUS => 405
24
        ]);
25 2
    }
26
}
27