Passed
Push — master ( 60319d...b48e8d )
by Daniele
08:21
created

ReservedCallStaticTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __callStatic() 0 10 2
1
<?php
2
3
namespace FluidXml;
4
5
trait ReservedCallStaticTrait
6
{
7
        public static function __callStatic($method, $arguments)
8
        {
9
                $m = "{$method}_";
10
11
                if (\method_exists(static::class, $m)) {
12
                        return static::$m(...$arguments);
13
                }
14
15
                throw new \Exception("Method '$method' not found.");
16
        }
17
}
18