Skip to content
This repository was archived by the owner on Jan 6, 2020. It is now read-only.

Laravel 6 support - I didn't test it yet #66

Merged
merged 2 commits into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"ext-json": "*",
"guzzlehttp/guzzle": "6.3.3",
"symfony/dotenv": "4.3.4",
"nesbot/carbon": "2.25.0",
"nesbot/carbon": "^2.25",
"psr/cache": "1.0.1",
"symfony/cache": "4.3.4",
"league/flysystem": "^1.0",
"illuminate/support": "5.8.*",
"illuminate/support": "^6.0",
"psr/log": "^1.1"
},
"require-dev": {
Expand Down
7 changes: 3 additions & 4 deletions src/RiotQuest/Components/Client/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,18 @@ public function load(): void

$keys = [];

if (isset($_ENV['RIOTQUEST_STANDARD_KEY'])) {
if (!empty(env('RIOTQUEST_STANDARD_KEY'))) {
$keys[] = $this->getKey('STANDARD');
}

if (isset($_ENV['RIOTQUEST_TOURNAMENT_KEY'])) {
if (!empty(env('RIOTQUEST_TOURNAMENT_KEY'))) {
$keys[] = $this->getKey('TOURNAMENT');
}

if (count($keys)) {
$this->addKeys(...$keys);
return;
}

throw new LeagueException("ERROR (code 12): No valid API keys were found.");
}

Expand Down Expand Up @@ -193,7 +192,7 @@ public function setLogging(bool $state): void
*/
private function getKey($target): Token
{
return new Token($_ENV["RIOTQUEST_{$target}_KEY"], $target);
return new Token(env("RIOTQUEST_{$target}_KEY"), $target);
}

/**
Expand Down