Passed
Push — master ( 620416...a29fb4 )
by Rougin
02:02
created

Facade   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __callStatic() 0 7 1
1
<?php
2
3
namespace App\Facades;
4
5
/**
6
 * Abstract Facade
7
 *
8
 * @package App
9
 * @author  Rougin Royce Gutib <[email protected]>
10
 *
11
 * @method static string accessor()
12
 */
13
abstract class Facade
14
{
15
    /**
16
     * Handle dynamic, static calls to the object.
17
     *
18
     * @param  string $method
19
     * @param  array  $arguments
20
     * @return mixed
21
     */
22 9
    public static function __callStatic($method, $arguments)
23
    {
24 9
        $class = \App\Bootstrap::make(static::accessor());
25
26 9
        $instance = array($class, $method);
27
28 9
        return call_user_func_array($instance, $arguments);
29
    }
30
}
31