Completed
Push — master ( 7ba991...d4ab1b )
by Tobias
03:56
created

GenericHTTPError   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

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
/**
15
 * @deprecated Will be removed in 3.0
16
 */
17
class GenericHTTPError extends \Exception implements Exception
18
{
19
    protected $httpResponseCode;
20
    protected $httpResponseBody;
21
22
    public function __construct($message = null, $response_code = null, $response_body = null, $code = 0, \Exception $previous = null)
23
    {
24
        parent::__construct($message, $code, $previous);
25
26
        $this->httpResponseCode = $response_code;
27
        $this->httpResponseBody = $response_body;
28
    }
29
30
    public function getHttpResponseCode()
31
    {
32
        return $this->httpResponseCode;
33
    }
34
35
    public function getHttpResponseBody()
36
    {
37
        return $this->httpResponseBody;
38
    }
39
}
40