Completed
Push — master ( b9be17...2cea84 )
by Jeroen
33s queued 30s
created

EmptyResponseException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResponse() 0 4 1
1
<?php
2
3
namespace TreeHouse\Feeder\Exception;
4
5
use Psr\Http\Message\ResponseInterface;
6
7
class EmptyResponseException extends TransportException
8
{
9
    /**
10
     * @var ResponseInterface
11
     */
12
    private $response;
13
14
    /**
15
     * @param ResponseInterface $response
16
     */
17
    public function __construct(ResponseInterface $response)
18
    {
19
        $this->response = $response;
20
21
        parent::__construct('Server did not return any content, status code was ' . $response->getStatusCode());
22
    }
23
24
    /**
25
     * @return ResponseInterface
26
     */
27
    public function getResponse()
28
    {
29
        return $this->response;
30
    }
31
}
32