Passed
Push — master ( df3584...1bc9e0 )
by Ryosuke
04:23
created

HttpException   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 26
ccs 14
cts 14
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getStatusCode() 0 4 1
A getReasonPhrase() 0 4 1
A getResponse() 0 4 1
1
<?php
2
3
namespace mpyw\Cowitter;
4
5
use mpyw\Cowitter\Response;
6
7
class HttpException extends \RuntimeException implements HttpExceptionInterface
8
{
9
    protected $ch;
10
    protected $response;
11
12 14
    public function __construct($message, $code, Response $response)
13 14
    {
14 14
        parent::__construct($message, $code);
15 14
        $this->response = $response;
16 14
    }
17
18 1
    public function getStatusCode()
19 1
    {
20 1
        return $this->response->getStatusCode();
21
    }
22
23 1
    public function getReasonPhrase()
24 1
    {
25 1
        return $this->response->getReasonPhrase();
26
    }
27
28 1
    public function getResponse()
29 1
    {
30 1
        return $this->response;
31
    }
32
}
33