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