Completed
Push — master ( ec4c56...bd8716 )
by David
04:49
created

NetworkException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Http\Client\Exception;
4
5
use Psr\Http\Message\RequestInterface;
6
use Psr\Http\Client\NetworkExceptionInterface as PsrNetworkException;
7
8
/**
9
 * Thrown when the request cannot be completed because of network issues.
10
 *
11
 * There is no response object as this exception is thrown when no response has been received.
12
 *
13
 * @author Márk Sági-Kazár <[email protected]>
14
 */
15
class NetworkException extends TransferException implements PsrNetworkException
16
{
17
    use RequestAwareTrait;
18
19
    /**
20
     * @param string           $message
21
     * @param RequestInterface $request
22
     * @param \Exception|null  $previous
23
     */
24 6
    public function __construct($message, RequestInterface $request, \Exception $previous = null)
25
    {
26 6
        $this->setRequest($request);
27
28 6
        parent::__construct($message, 0, $previous);
29 6
    }
30
}
31