| Total Complexity | 8 |
| Total Lines | 79 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Quotes |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | private $source; |
||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | private $quotes; |
||
| 15 | /** |
||
| 16 | * @var int |
||
| 17 | */ |
||
| 18 | private $timestamp; |
||
| 19 | /** |
||
| 20 | * @var \DateTimeInterface|null |
||
| 21 | */ |
||
| 22 | private $date = null; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Currency constructor. |
||
| 26 | * |
||
| 27 | * @param array $data |
||
| 28 | * |
||
| 29 | * @throws \Exception |
||
| 30 | */ |
||
| 31 | public function __construct(array $data) |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function source(): string |
||
| 43 | { |
||
| 44 | return $this->source; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return array |
||
| 49 | */ |
||
| 50 | public function quotes(): array |
||
| 51 | { |
||
| 52 | return $this->quotes; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return int |
||
| 57 | */ |
||
| 58 | public function timestamp(): int |
||
| 59 | { |
||
| 60 | return $this->timestamp; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return \DateTimeInterface|null |
||
| 65 | */ |
||
| 66 | public function date(): ?\DateTimeInterface |
||
| 67 | { |
||
| 68 | return $this->date; |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param string $name |
||
| 73 | * |
||
| 74 | * @return float |
||
| 75 | */ |
||
| 76 | public function __get(string $name): float |
||
| 84 | } |
||
| 85 | } |
||
| 86 |