Completed
Pull Request — master (#14)
by Pavel
04:24
created

ApiCallException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

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\RpcResponseInterface;
6
7
class ApiCallException extends \RuntimeException implements DoctrineApiException
8
{
9
    public static function callFailed(RpcResponseInterface $response)
10
    {
11
        return new static(
12
            sprintf('RPC Call failed: %s', $response->getError())
13
        );
14
    }
15
}
16