RockPaperScissorsSpockLizardException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 4 1
1
<?php namespace Jarrett;
2
3
use \Exception;
4
5
/**
6
 * Class HughesException
7
 * @package HughesApi\Exception
8
 */
9
class RockPaperScissorsSpockLizardException extends Exception
10
{
11
    // Redefine the exception so message isn't optional
12 12
    public function __construct($message, $code = 0, Exception $previous = null)
13
    {
14
        // make sure everything is assigned properly
15 12
        parent::__construct($message, $code, $previous);
16 12
    }
17
18
    // custom string representation of object
19 1
    public function __toString()
20
    {
21 1
        return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
22
    }
23
}
24