Handler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 16
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A callAction() 0 7 2
1
<?php
2
3
namespace Hivokas\LaravelHandlers;
4
5
use BadMethodCallException;
6
use Illuminate\Routing\Controller as BaseController;
7
8
abstract class Handler extends BaseController
9
{
10
    /**
11
     * Execute an action on the handler.
12
     *
13
     * @param  string  $method
14
     * @param  array   $parameters
15
     * @return \Symfony\Component\HttpFoundation\Response
16
     */
17
    public function callAction($method, $parameters)
18
    {
19
        if ($method === '__invoke') {
20
            return call_user_func_array([$this, $method], $parameters);
21
        }
22
23
        throw new BadMethodCallException('Only __invoke method can be called on handler.');
24
    }
25
}
26