defineRateProvider(); } private function defineRateProvider(): void { $provider = null; $collection = $this->rateProviderCollection; try { $provider = $collection->get($this->currencyProviderKey); } catch (Throwable $th) { // Currency provider not found } if (!$provider) { /** @var RateProviderInterface */ $provider = $collection->get(NullRateProvider::LOOKUP_KEY); } $this->app->set( RateProviderInterface::class, $provider ); } }