Completed
Push — master ( b9edbb...17a3aa )
by Vaibhavraj
01:21
created

InvalidConfigurationException   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 0
dl 0
loc 32
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidNetworkName() 0 4 1
A invalidStorageClass() 0 4 1
A invalidOrEmptyPairingCode() 0 4 1
A invalidOrEmptyPairingCodeLabel() 0 4 1
A emptyToken() 0 4 1
A invalidOrEmptyPassword() 0 4 1
1
<?php
2
3
namespace Vrajroham\LaravelBitpay\Exceptions;
4
5
use Exception;
6
7
class InvalidConfigurationException extends Exception
8
{
9
    public static function invalidNetworkName(): self
10
    {
11
        return new static('Invalid network option provided in config. Should be livenet ot testnet only.');
12
    }
13
14
    public static function invalidStorageClass()
15
    {
16
        return new static('Invalid key storage class provided in config.');
17
    }
18
19
    public static function invalidOrEmptyPassword()
20
    {
21
        return new static("Password missing in config. Password is required to encrypt and decrypt keys on the filesystem.");
22
    }
23
24
    public static function invalidOrEmptyPairingCode()
25
    {
26
        return new static("Invalid or empty pairing code. To create new visit merchant dashboard on bitpay.");
27
    }
28
29
    public static function invalidOrEmptyPairingCodeLabel()
30
    {
31
        return new static("Invalid or empty pairing code label.");
32
    }
33
34
    public static function emptyToken()
35
    {
36
        return new static("BitPay token is empty. Set token in `bitpay-config` file.");
37
    }
38
}
39