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

Facade::__callStatic()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 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