SearchReplaceException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 13
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 3 1
1
<?php namespace SearchReplace;
2
3
use \Exception;
4
5
/**
6
 * Class HughesException
7
 * @package HughesApi\Exception
8
 */
9
class SearchReplaceException extends Exception
10
{
11
    // Redefine the exception so message isn't optional
12
    public function __construct($message, $code = 0, Exception $previous = null)
13
    {
14
        // make sure everything is assigned properly
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
}
24
25