InvalidMethodException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
namespace AsimovExpress\AdobeConnect\Http;
3
4
class InvalidMethodException extends \Exception
5
{
6
    /**
7
     * The http method used in the request.
8
     *
9
     * @var string
10
     */
11
    protected $method;
12
13
    /**
14
     * Create a new InvalidMethodException instance.
15
     *
16
     * @param string $method The http method intended to use.
17
     * @param string $message Custom message to be shown.
18
     * @param int $code Exception code.
19
     */
20
    public function __construct($method, $message = '', $code = 0)
21
    {
22
        $this->method = $method;
23
        if (!$message) {
24
            $message = "The HTTP method {$this->method} is not allowed in this package, use POST instead.";
25
        }
26
        parent::__construct($message, $code);
27
    }
28
}
29