Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Currency extends Model |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $table = 'currencylayer_currencies'; |
||
19 | /** |
||
20 | * @var bool |
||
21 | */ |
||
22 | public $timestamps = false; |
||
23 | /** |
||
24 | * @var array<string> |
||
25 | */ |
||
26 | protected $fillable = [ |
||
27 | 'code', |
||
28 | ]; |
||
29 | |||
30 | public function rates(): HasMany |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get rate for given currency and date. |
||
37 | * |
||
38 | * @param Currency|string $currency |
||
39 | * @param Carbon|string|null $date |
||
40 | * |
||
41 | * @return Rate|null |
||
42 | */ |
||
43 | public function rateFor($currency, $date = null): ?Rate |
||
58 |