ErrorRender   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __toString() 0 3 1
1
<?php
2
3
namespace DevPontes\View\Exception;
4
5
use Exception;
6
use Throwable;
7
8
/**
9
 * Class DevPontes View
10
 *
11
 * @author Moises Pontes <[email protected]>
12
 * @package DevPontes\View\Exception
13
 */
14
class ErrorRender extends Exception
15
{
16
    /**
17
     * ErrorRender constructor.
18
     *
19
     * @param string $message
20
     * @param integer $code
21
     * @param Throwable|null $previous
22
     */
23
    public function __construct(string $message, int $code = 1, Throwable $previous = null)
24
    {
25
        parent::__construct($message, $code, $previous);
26
    }
27
28
    public function __toString()
29
    {
30
        return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
31
    }
32
}
33