| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class Generic |
||
| 17 | { |
||
| 18 | use QuotationTraits; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Generic constructor. |
||
| 22 | * @param array $currencies |
||
| 23 | * @param string $formatResponse |
||
| 24 | */ |
||
| 25 | public function __construct(array $currencies, $formatResponse = Quotation::RESPONSE_JSON) |
||
| 26 | { |
||
| 27 | $this->currency = $this->bindCurrencies($currencies); |
||
| 28 | $this->format = $this->setFormat($formatResponse); |
||
| 29 | $this->base = "https://economia.awesomeapi.com.br/{$this->format}/"; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return mixed|null |
||
| 34 | */ |
||
| 35 | public function quote() |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param array $currencies |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | private function bindCurrencies(array $currencies): string |
||
| 52 | } |
||
| 53 | } |