Skip to content

Commit

Permalink
chore: remove unnecessary PHPStan ignored errors
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed Jan 4, 2023
1 parent 0964a7e commit 8c46503
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Commands/ViewLatestRatesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class ViewLatestRatesCommand extends Command
use HasUsefulConsoleMethods;

public $signature = 'exchange:rates
{base_currency? : The base currency to convert from.}
{base-currency? : The base currency to convert from.}
{currencies?* : Any number of currencies to fetch exchange rates for.}';

public $description = 'Retrieve exchange rates for a given set of currencies.';
Expand Down Expand Up @@ -53,7 +53,7 @@ private function data(CurrencyCodeProvider $currencyCodeProvider): array
$givenCurrencies = $this->argument('currencies');

return [
'base_currency' => $this->argument('base_currency') ?? $this->ask(
'base_currency' => $this->argument('base-currency') ?? $this->ask(
'Which base currency do you want to use?'
),
'currencies' => count($givenCurrencies) > 0 ? $givenCurrencies : $this->choice(
Expand Down
1 change: 0 additions & 1 deletion src/ExchangeRateProviders/CachedProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public function getRates(string $baseCurrency, array $currencies): Rates
{
$currenciesForKey = implode(',', Arr::sort($currencies));

// @phpstan-ignore-next-line
return $this->cache->remember(
"{$this->key}:{$baseCurrency}:{$currenciesForKey}",
$this->ttl,
Expand Down
1 change: 0 additions & 1 deletion src/ExchangeRateProviders/NullProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public function getRates(string $baseCurrency, array $currencies): Rates
{
return new Rates(
$baseCurrency,
// @phpstan-ignore-next-line
array_fill_keys($currencies, 1.0),
now()
);
Expand Down
4 changes: 0 additions & 4 deletions src/Support/ExchangeRateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public function createFixerDriver(): FixerProvider
));

return new FixerProvider(
// @phpstan-ignore-next-line
$this->container->make(Factory::class),
$apiKey,
);
Expand All @@ -44,23 +43,20 @@ public function createFixerDriver(): FixerProvider
public function createExchangeRateDriver(): ExchangeRateHostProvider
{
return new ExchangeRateHostProvider(
// @phpstan-ignore-next-line
$this->container->make(Factory::class),
);
}

public function createFrankfurterDriver(): FrankfurterProvider
{
return new FrankfurterProvider(
// @phpstan-ignore-next-line
$this->container->make(Factory::class),
);
}

public function createCacheDriver(): CachedProvider
{
return new CachedProvider(
// @phpstan-ignore-next-line
$this->container->make(Repository::class),
// @phpstan-ignore-next-line
$this->driver($this->config->get('exchange.services.cache.strategy')),
Expand Down
1 change: 0 additions & 1 deletion src/Testing/FakeExchangeRateProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public function assertRetrievedRates(int $times = 1): self
*/
private function getRatesArray(array $currencies): array
{
// @phpstan-ignore-next-line
return array_merge(array_fill_keys($currencies, 1.0), $this->predefinedRates);
}
}

0 comments on commit 8c46503

Please sign in to comment.