Learned that I should not refer to env vars directly so I removed all references.

This commit is contained in:
James Cole
2018-12-15 07:59:02 +01:00
parent 4bd94e5450
commit c54541b839
116 changed files with 239 additions and 157 deletions

View File

@@ -44,7 +44,7 @@ class FixerIOv2 implements ExchangeRateInterface
*/
public function __construct()
{
if ('testing' === env('APP_ENV')) {
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
}
}
@@ -70,7 +70,7 @@ class FixerIOv2 implements ExchangeRateInterface
$exchangeRate->created_at = new Carbon;
// get API key
$apiKey = env('FIXER_API_KEY', '');
$apiKey = config('firefly.fixer_api_key');
// if no API key, return unsaved exchange rate.
if ('' === $apiKey) {