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

ApiException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 19
ccs 10
cts 10
cp 1
rs 9.4285
cc 1
eloc 16
nc 1
nop 7
crap 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