Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
30 | 6 | public function __call($method, $parameters) |
|
31 | { |
||
32 | 6 | if (Str::startsWith($method, 'storage')) { |
|
33 | 5 | $realMethodName = lcfirst(Str::after($method, 'storage')); |
|
34 | 5 | if (method_exists($this->storage, $realMethodName)) { |
|
35 | 4 | return $this->storage->{$realMethodName}(...$parameters); |
|
36 | } |
||
37 | } |
||
38 | |||
39 | 2 | throw new \BadMethodCallException("Method [{$method}] not exists."); |
|
40 | } |
||
52 |