Completed
Pull Request — master (#14)
by Pavel
03:40
created

ApiCallException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A callFailed() 0 6 1
1
<?php
2
3
namespace Bankiru\Api\Doctrine\Exception;
4
5
use ScayTrase\Api\Rpc\Exception\RemoteCallFailedException;
6
use ScayTrase\Api\Rpc\RpcResponseInterface;
7
8
class ApiCallException extends RemoteCallFailedException implements DoctrineApiException
9
{
10
    public static function callFailed(RpcResponseInterface $response)
11
    {
12
        return new static(
13
            sprintf('RPC Call failed: %s', $response->getError())
14
        );
15
    }
16
}
17