Passed
Push — main ( 9cd52a...326916 )
by Moises
01:16
created

ErrorRoute::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace DevPontes\Route\Exception;
4
5
use Exception;
6
use Throwable;
7
8
/**
9
 * Class DevPontes ErrorRoute
10
 *
11
 * @author Moises Pontes <[email protected]>
12
 * @package DevPontes\Route\Exception
13
 */
14
class ErrorRoute extends Exception
15
{
16
    /**
17
     * ErrorRoute 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