Skip to content

Commit

Permalink
fix for compatibility with php 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gutocf committed May 25, 2022
1 parent 5187e26 commit ba7ab9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Service/V1/FipeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public function getReferenceTables(): array
*/
public function getAllBrandsByType(?VehicleType $vehicleType = null, ?int $referenceTableId = null): array
{
$path = sprintf('/api/feriados/v1/%s', $vehicleType?->getValue());
$vehicleTypeParam = $vehicleType ? $vehicleType->getValue() : null;
$path = sprintf('/api/feriados/v1/%s', $vehicleTypeParam);
$queryParams = ['tabela_referencia' => $referenceTableId];
$data = $this->adapter->get($path, $queryParams);

Expand Down

0 comments on commit ba7ab9c

Please sign in to comment.