| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function __call($method, $parameters) |
||
| 29 | { |
||
| 30 | if (!$this->currency) { |
||
| 31 | throw new Exception('Currency can not be null! Call setCurrency() for setting it.'); |
||
| 32 | } |
||
| 33 | $factory = new LaravelCryptoStatsFactory(); |
||
| 34 | $instance = $factory->getInstance($this->currency); |
||
| 35 | |||
| 36 | if (!$instance) { |
||
| 37 | throw new Exception('Instance of the LaravelCryptoStats API connector was not created!'); |
||
| 38 | } |
||
| 39 | |||
| 40 | return $instance->$method(...$parameters); |
||
| 41 | } |
||
| 43 |