Exceptions   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
1
<?php
2
3
namespace ParkwayProjects\PayWithBank3D\Exceptions;
4
5
use Exception;
6
7
class Exceptions extends Exception
8
{
9
    private static $_errors = [
10
        'format.null_mode'          => 'The specified mode is null. Please use either live or staging',
11
        'format.invalid_currency_code' => 'The specified currency code is invalid. Please use ISO 4217 notation (e.g. USD).',
12
        'format.unsupported_currency'  => 'The specified currency code is not currently supported.',
13
        'format.unsupported_type'      => 'The Specified Types Is Currently Not Supported',
14
        'format.is_null'      => 'The Access Token can not be null. Please pass it to the constructor',
15
    ];
16
17
    public static function create($message)
18
    {
19
        return new static(self::$_errors[$message]);
20
    }
21
}
22