MraException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 2 1
A __construct() 0 3 1
1
<?php
2
3
namespace Puerari\Moodle;
4
5
use Exception;
6
/*use Throwable;*/
7
8
/**
9
 * @class MraException
10
 * @package Puerari\Moodle
11
 * @author Leandro Puerari <[email protected]>
12
 */
13
class MraException extends Exception
14
{
15
    public function __construct($message, $code = 0/*, Throwable $previous = null*/)
16
    {
17
        parent::__construct('MoodleRestApi: ' . $message, $code/*, $previous*/);
18
    }
19
20
    public function __toString() {
21
        return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
22
    }
23
}
24