| Total Complexity | 6 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class LaravelCryptoStatsFactory |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Array of the existed API connectors. |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | public $connectors; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * LaravelCryptoStatsFactory buider. |
||
| 18 | * |
||
| 19 | * Get the array of the API connector classes and write it to the $connectors variable |
||
| 20 | */ |
||
| 21 | public function __construct() |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Get the instance of the needed API connector class. |
||
| 29 | * |
||
| 30 | * @param string $currency - currency for which the API connector instance will be created |
||
| 31 | * |
||
| 32 | * @throws Exception |
||
| 33 | * |
||
| 34 | * @return \LaravelCryptoStats\connector - instance of the needed API connector class |
||
| 35 | */ |
||
| 36 | public function getInstance($currency) |
||
| 62 |