Completed
Push — master ( 0c1923...90d6e2 )
by Anton
10s
created

ProxyTrait::__callStatic()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * Bluz Framework Component
4
 *
5
 * @copyright Bluz PHP Team
6
 * @link https://github.com/bluzphp/framework
7
 */
8
9
/**
10
 * @namespace
11
 */
12
namespace Bluz\Proxy;
13
14
use Bluz\Common\Singleton;
15
16
/**
17
 * ProxyTrait
18
 *
19
 * @package  Bluz\Proxy
20
 * @author   Anton Shevchuk
21
 */
22
trait ProxyTrait
23
{
24
    use Singleton;
25
26
    /**
27
     * Handle dynamic, static calls to the object.
28
     *
29
     * @param  string $method
30
     * @param  array $args
31
     * @return mixed
32
     */
33 653
    public static function __callStatic($method, $args)
34
    {
35 653
        return  static::getInstance()->$method(...$args);
36
    }
37
}
38