Completed
Push — master ( b9ac23...46f1c6 )
by ARCANEDEV
7s
created

ApiException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 37
ccs 10
cts 10
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 19 1
1
<?php namespace Arcanedev\Stripe\Exceptions;
2
3
use Arcanedev\Stripe\Bases\StripeException;
4
5
/**
6
 * Class     ApiException
7
 *
8
 * @package  Arcanedev\Stripe\Exceptions
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class ApiException extends StripeException
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Constructor
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * API Exception Constructor.
19
     *
20
     * @param  string       $message
21
     * @param  int          $code
22
     * @param  string|null  $type
23
     * @param  string|null  $stripeCode
24
     * @param  string|null  $httpBody
25
     * @param  array        $jsonBody
26
     * @param  array        $params
27
     */
28 84
    public function __construct(
29
        $message,
30
        $code = 500,
31
        $type = 'api_error',
32
        $stripeCode = null,
33
        $httpBody = null,
34
        $jsonBody = [],
35
        $params = []
36
    ) {
37 84
        parent::__construct(
38 68
            $message,
39 68
            $code,
40 68
            $type,
41 68
            $stripeCode,
42 68
            $httpBody,
43 68
            $jsonBody,
44
            $params
45 68
        );
46 84
    }
47
}
48