Completed
Push — master ( 74929b...718547 )
by Tobias
03:47
created

GenericHTTPError   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 55.56%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 23
ccs 5
cts 9
cp 0.5556
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getHttpResponseCode() 0 4 1
A getHttpResponseBody() 0 4 1
A __construct() 0 7 1
1
<?php
2
3
/*
4
 * Copyright (C) 2013-2016 Mailgun
5
 *
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Mailgun\Connection\Exceptions;
11
12
use Mailgun\Exception;
13
14
class GenericHTTPError extends \Exception implements Exception
15
{
16
    protected $httpResponseCode;
17
    protected $httpResponseBody;
18
19 1
    public function __construct($message = null, $response_code = null, $response_body = null, $code = 0, \Exception $previous = null)
20
    {
21 1
        parent::__construct($message, $code, $previous);
22
23 1
        $this->httpResponseCode = $response_code;
24 1
        $this->httpResponseBody = $response_body;
25 1
    }
26
27
    public function getHttpResponseCode()
28
    {
29
        return $this->httpResponseCode;
30
    }
31
32
    public function getHttpResponseBody()
33
    {
34
        return $this->httpResponseBody;
35
    }
36
}
37