PotatoException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Ganga\Potato;
4
5
use Exception;
6
7
/**
8
 * Custom Exception Class for Urban Words Manager
9
 */
10
class PotatoException extends Exception
11
{
12
    // Redefine the exception so message isn't optional
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
}
24