MethodNotAllowedException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getAllowedMethods() 0 4 1
1
<?php
2
/**
3
 * slince routing library
4
 * @author Tao <[email protected]>
5
 */
6
namespace Slince\Routing\Exception;
7
8
class MethodNotAllowedException extends \Exception
9
{
10
    /**
11
     * @var array
12
     */
13
    protected $_allowedMethods = array();
14
15
    public function __construct(array $allowedMethods, $message = null, $code = 0, $previous = null)
16
    {
17
        $this->_allowedMethods = array_map('strtoupper', $allowedMethods);
18
19
        parent::__construct($message, $code, $previous);
20
    }
21
22
    /**
23
     * Gets the allowed HTTP methods.
24
     * @return array
25
     */
26
    public function getAllowedMethods()
27
    {
28
        return $this->_allowedMethods;
29
    }
30
}
31