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

ReservedCallTrait::__call()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 10
rs 9.4285
cc 2
eloc 5
nc 2
nop 2
1
<?php
2
3
namespace FluidXml;
4
5
trait ReservedCallTrait
6
{
7
        public function __call($method, $arguments)
8
        {
9
                $m = "{$method}_";
10
11
                if (\method_exists($this, $m)) {
12
                        return $this->$m(...$arguments);
13
                }
14
15
                throw new \Exception("Method '$method' not found.");
16
        }
17
}
18