InvalidConfigurationException   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 7
c 1
b 0
f 0
dl 0
loc 30
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidOrEmptyPairingCode() 0 3 1
A emptyToken() 0 3 1
A invalidOrEmptyPassword() 0 3 1
A invalidStorageClass() 0 3 1
A invalidNetworkName() 0 3 1
A invalidOrEmptyPairingCodeLabel() 0 3 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