Passed
Push — master ( 47699c...d74cf0 )
by Rougin
01:47
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.008

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 7
ccs 4
cts 5
cp 0.8
crap 1.008
rs 9.4285
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
abstract class Facade
12
{
13
    /**
14
     * Handle dynamic, static calls to the object.
15
     *
16
     * @param  string $method
17
     * @param  array  $arguments
18
     * @return mixed
19
     */
20 6
    public static function __callStatic($method, $arguments)
21
    {
22 6
        $class = \App\Bootstrap::make(static::accessor());
0 ignored issues
show
Bug introduced by
The method accessor() does not exist on App\Facades\Facade. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
        $class = \App\Bootstrap::make(static::/** @scrutinizer ignore-call */ accessor());
Loading history...
23
24 6
        $instance = array($class, $method);
25
26 6
        return call_user_func_array($instance, $arguments);
27
    }
28
}
29