Grabar UF y capacidad de obtener hoy.
This commit is contained in:
@ -18,9 +18,12 @@ class MiIndicador implements Provider
|
||||
/**
|
||||
* @throws EmptyResponse
|
||||
*/
|
||||
public function get(string $money_symbol, DateTimeInterface $dateTime): float
|
||||
public function get(string $money_symbol, ?DateTimeInterface $dateTime = null): float
|
||||
{
|
||||
$request_uri = "{$money_symbol}/{$dateTime->format('d-m-Y')}";
|
||||
$request_uri = "{$money_symbol}";
|
||||
if ($dateTime !== null) {
|
||||
$request_uri = "{$money_symbol}/{$dateTime->format('d-m-Y')}";
|
||||
}
|
||||
try {
|
||||
$response = $this->client->get($request_uri);
|
||||
} catch (GuzzleException) {
|
||||
|
Reference in New Issue
Block a user