NoResponseReceivedException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/*
3
 * This file is part of JSON RPC Client.
4
 *
5
 * (c) Igor Lazarev <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Strider2038\JsonRpcClient\Exception;
12
13
use Strider2038\JsonRpcClient\Request\RequestObjectInterface;
14
15
/**
16
 * @author Igor Lazarev <[email protected]>
17
 */
18
class NoResponseReceivedException extends \Exception implements JsonRpcClientExceptionInterface
19
{
20 1
    public function __construct(RequestObjectInterface $request)
21
    {
22 1
        parent::__construct(
23 1
            sprintf(
24 1
                'Request object "%s" has no response from server in batch request.',
25 1
                json_encode($request)
26
            )
27
        );
28 1
    }
29
}
30