Completed
Push — master ( 60aec0...f632bc )
by Andreas
12:47 queued 10:41
created

GatewayException::notImplemented()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.037

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 6
ccs 2
cts 3
cp 0.6667
rs 9.4285
c 1
b 1
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1.037
1
<?php
2
3
namespace Larium\Pay;
4
5
use RuntimeException;
6
7
class GatewayException extends RuntimeException
8
{
9 1
    public static function notImplemented($method)
10
    {
11
        return new self(
12 1
            sprintf("Method `%s` is not supported!", $method)
13
        );
14
    }
15
16 1
    public static function invalidGatewayName($name)
17
    {
18
        return new self(
19 1
            sprintf("Could not resolve gateway with name `%s`", $name)
20
        );
21
    }
22
23
    public static function gatewayAlreadyRegistered($name)
24
    {
25
        return new self(
26
            sprintf("Gateway with name `%s` is already registered", $name)
27
        );
28
    }
29
}
30