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

GenericHTTPError::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 7
ccs 0
cts 5
cp 0
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 4
nc 1
nop 5
crap 2
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