GenericsException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 22
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the PHP Generics package.
5
 *
6
 * @package Generics
7
 */
8
namespace Generics;
9
10
use Generics\Util\Interpolator;
11
12
/**
13
 * This class provides a generic exception
14
 *
15
 * @author Maik
16
 */
17
class GenericsException extends \Exception
18
{
19
    use Interpolator;
20
21
    /**
22
     * Create a new GenericsException
23
     *
24
     * @param string $message
25
     *            The message to throw; May contain placeholder like {placeholder} and will be replaced by context
26
     *            elements
27
     * @param array $context
28
     *            The context elements to replace in message
29
     * @param number $code
30
     *            Optional code
31
     * @param \Exception $previous
32
     *            Optional previous exception
33
     */
34 57
    public function __construct($message, array $context = array(), $code = 0, \Exception $previous = null)
35
    {
36 57
        parent::__construct($this->interpolate($message, $context), $code, $previous);
37 57
    }
38
}
39