OAuthException::getErrorCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php namespace Arcanedev\Stripe\Exceptions\OAuth;
2
3
use Arcanedev\Stripe\Exceptions\StripeException;
4
5
/**
6
 * Class     OAuthException
7
 *
8
 * @package  Arcanedev\Stripe\Exceptions\OAuth
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class OAuthException extends StripeException
12
{
13
    /* -----------------------------------------------------------------
14
     |  Constructor
15
     | -----------------------------------------------------------------
16
     */
17
18 8
    public function __construct(
19
        $code, $message, $httpStatus = null, $httpBody = null, $jsonBody = null, $httpHeaders = null
20
    ) {
21 8
        parent::__construct($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders);
22
23 8
        $this->code = $code;
24 8
    }
25
26
    /* -----------------------------------------------------------------
27
     |  Getters & Setters
28
     | -----------------------------------------------------------------
29
     */
30
31 8
    public function getErrorCode()
32
    {
33 8
        return $this->code;
34
    }
35
}
36