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

EvangelizeException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 0
cbo 0
dl 0
loc 14
rs 10
ccs 0
cts 8
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
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
}