Completed
Push — master ( 72fb6a...0c057f )
by Christopher
13:57 queued 29s
created

EvangelizeException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
ccs 0
cts 4
cp 0
cc 1
eloc 2
nc 1
nop 3
crap 2
1
<?php
2
3
namespace Vundi\Checkpoint1;
4
5
use Exception;
6
7
/**
8
 * Custom Exception Class for PHP Evangelize
9
 */
10
class EvangelizeException extends Exception
11
{
12
    // Message
13
    public function __construct($message, $code = 1, Exception $previous = null)
14
    {
15
        parent::__construct($message, $code, $previous);
16
    }
17
18
    // custom string representation of object
19
    public function __toString()
20
    {
21
        return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
22
    }
23
}