Completed
Push — master ( d34cec...faecd8 )
by Augusto
02:22
created

Exception   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A runTarget() 0 4 1
A __construct() 0 5 1
1
<?php
2
/*
3
 * This file is part of the Respect\Rest package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Respect\Rest\Routes;
10
11
class Exception extends Callback
12
{
13
    public $class;
14
    public $callback;
15
    public $exception;
16
17 1
    public function __construct($class, $callback)
18
    {
19 1
        $this->class = $class;
20 1
        parent::__construct('ANY', '^$', $callback);
21 1
    }
22
23 1
    public function runTarget($method, &$params)
24
    {
25 1
        return call_user_func($this->callback, $this->exception);
26
    }
27
}
28