JsonRpcProtocolException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 14
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A requestSendButNotResponded() 0 7 1
1
<?php
2
3
namespace ScayTrase\Api\JsonRpc\Exception;
4
5
use ScayTrase\Api\JsonRpc\JsonRpcRequestInterface;
6
7
class JsonRpcProtocolException extends \LogicException implements JsonRpcExceptionInterface
8
{
9
    /**
10
     * @param JsonRpcRequestInterface $request
11
     * @return static
12
     */
13
    public static function requestSendButNotResponded(JsonRpcRequestInterface $request)
14
    {
15
        return new static(sprintf(
16
            'Request with id "%s" was sent to endpoint, but output does not contain response for this request',
17
            $request->getId()
18
        ));
19
    }
20
}
21