Passed
Branch main (6957a7)
by Moises
07:57 queued 06:04
created

ErrorRender   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
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 [type] $message
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
20
     * @param integer $code
21
     * @param Throwable|null $previous
22
     */
23
    public function __construct($message, $code = 0, 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