| Total Complexity | 3 | 
| Total Lines | 47 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 15 | class GetPaid_Payment_Exception extends Exception { | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * Sanitized error code.  | 
            ||
| 19 | *  | 
            ||
| 20 | * @var string  | 
            ||
| 21 | */  | 
            ||
| 22 | protected $error_code;  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * Error extra data.  | 
            ||
| 26 | *  | 
            ||
| 27 | * @var array  | 
            ||
| 28 | */  | 
            ||
| 29 | protected $error_data;  | 
            ||
| 30 | |||
| 31 | /**  | 
            ||
| 32 | * Setup exception.  | 
            ||
| 33 | *  | 
            ||
| 34 | * @param string $code Machine-readable error code, e.g `getpaid-discount-error`.  | 
            ||
| 35 | * @param string $message User-friendly translated error message, e.g. 'Discount is invalid'.  | 
            ||
| 36 | * @param int $http_status_code Proper HTTP status code to respond with, e.g. 400.  | 
            ||
| 37 | * @param array $data Extra error data.  | 
            ||
| 38 | */  | 
            ||
| 39 | 	public function __construct( $code, $message, $http_status_code = 400, $data = array() ) { | 
            ||
| 44 | }  | 
            ||
| 45 | |||
| 46 | /**  | 
            ||
| 47 | * Returns the error code.  | 
            ||
| 48 | *  | 
            ||
| 49 | * @return string  | 
            ||
| 50 | */  | 
            ||
| 51 | 	public function getErrorCode() { | 
            ||
| 52 | return $this->error_code;  | 
            ||
| 53 | }  | 
            ||
| 54 | |||
| 55 | /**  | 
            ||
| 56 | * Returns error data.  | 
            ||
| 57 | *  | 
            ||
| 58 | * @return array  | 
            ||
| 59 | */  | 
            ||
| 60 | 	public function getErrorData() { | 
            ||
| 62 | }  | 
            ||
| 63 | |||
| 65 |