Passed
Push — master ( 47699c...d74cf0 )
by Rougin
01:47
created

Facade   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

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

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
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