General   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 12
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
1
<?php
2
3
/**
4
 *      General Exception class
5
 *
6
 *      @package php_EasyPay
7
 *      @version 1.1
8
 *      @author Dmitry Shovchko <[email protected]>
9
 *
10
 */
11
12
namespace EasyPay\Exception;
13
14
use EasyPay\Log as Log;
15
16
class General extends \RuntimeException implements EInterface
17
{
18
        /**
19
         *      Constructor
20
         *
21
         *      @param string $message
22
         *      @param \Throwable $previous
23
         */
24
        public function __construct($message, $code=0, \Exception $previous=null, $tracelog=false)
25
        {
26
                Log::instance()->error($message.(($tracelog)?PHP_EOL.$this->getTraceAsString():null));
27
                parent::__construct($message, $code, $previous);
28
        }
29
}
30