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

Commit

Permalink
Refactor after removing Framework folder
Browse files Browse the repository at this point in the history
  • Loading branch information
supergrecko committed Jun 22, 2019
1 parent 531cc45 commit d674b92
Show file tree
Hide file tree
Showing 160 changed files with 234 additions and 230 deletions.
2 changes: 1 addition & 1 deletion src/RiotQuest/Client.php
Expand Up @@ -2,7 +2,7 @@

namespace RiotQuest;

use RiotQuest\Components\Framework\Client\Client as Module;
use RiotQuest\Components\Client\Client as Module;

/**
* Class Client
Expand Down
6 changes: 3 additions & 3 deletions src/RiotQuest/Codegen/Codegen.php
Expand Up @@ -7,7 +7,7 @@
use League\Flysystem\Adapter\Local;
use Illuminate\Support\Collection;
use ReflectionException;
use RiotQuest\Components\Framework\Collections\Collection as LeagueCollection;
use RiotQuest\Components\Collections\Collection as LeagueCollection;
use ReflectionClass;
use ReflectionMethod;

Expand Down Expand Up @@ -40,11 +40,11 @@ public static function getInstance(): Codegen {
public static function createAll(Closure $closure): void {
$codegen = static::getInstance();

$in = new Filesystem(new Local(__DIR__ . '/../Components/Framework/Collections/'));
$in = new Filesystem(new Local(__DIR__ . '/../Components/Collections/'));

foreach ($in->listContents() as $file) {
if ($file['type'] === 'file') {
$res = $codegen->createFromClass("\\RiotQuest\\Components\\Framework\\Collections\\" . $file['filename']);
$res = $codegen->createFromClass("\\RiotQuest\\Components\\Collections\\" . $file['filename']);

$closure->call($res, $res);
}
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Cache;
namespace RiotQuest\Components\Cache;

use League\Flysystem\Adapter\Local;
use League\Flysystem\FileExistsException;
Expand Down Expand Up @@ -30,7 +30,7 @@ class Cache
*/
public function __construct()
{
$this->fs = new Filesystem(new Local(__DIR__ . "/../../../../storage/cache/$this->namespace"));
$this->fs = new Filesystem(new Local(__DIR__ . "/../../../storage/cache/$this->namespace"));
}

/**
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Cache;
namespace RiotQuest\Components\Cache;

/**
* Class RateLimitCache
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Cache;
namespace RiotQuest\Components\Cache;

/**
* Class RequestCache
Expand Down
@@ -1,17 +1,17 @@
<?php

namespace RiotQuest\Components\Framework\Client;
namespace RiotQuest\Components\Client;

use League\Flysystem\FileExistsException;
use League\Flysystem\FileNotFoundException;
use Psr\SimpleCache\InvalidArgumentException;
use RiotQuest\Components\DataProviders\BaseProvider;
use RiotQuest\Components\DataProviders\DataDragon;
use RiotQuest\Components\DataProviders\Provider;
use RiotQuest\Components\Framework\Cache\Cache;
use RiotQuest\Components\Framework\Cache\RateLimitCache;
use RiotQuest\Components\Framework\Cache\RequestCache;
use RiotQuest\Components\Framework\RateLimit\Manager;
use RiotQuest\Components\Cache\Cache;
use RiotQuest\Components\Cache\RateLimitCache;
use RiotQuest\Components\Cache\RequestCache;
use RiotQuest\Components\RateLimit\Manager;
use RiotQuest\Contracts\LeagueException;
use Symfony\Component\Dotenv\Dotenv;

Expand Down Expand Up @@ -114,8 +114,8 @@ public function load(): void
call_user_func([Provider::class, 'boot']);
$this->manager = new Manager();

if (file_exists(__DIR__ . '/../../../../../.env')) {
(new Dotenv())->load(__DIR__ . '/../../../../../.env');
if (file_exists(__DIR__ . '/../../../../.env')) {
(new Dotenv())->load(__DIR__ . '/../../../../.env');
}

$keys = [];
Expand Down
@@ -1,15 +1,15 @@
<?php

namespace RiotQuest\Components\Framework\Client;

use RiotQuest\Components\Framework\Endpoints\Champion;
use RiotQuest\Components\Framework\Endpoints\Code;
use RiotQuest\Components\Framework\Endpoints\League;
use RiotQuest\Components\Framework\Endpoints\Mastery;
use RiotQuest\Components\Framework\Endpoints\Match;
use RiotQuest\Components\Framework\Endpoints\Spectator;
use RiotQuest\Components\Framework\Endpoints\Status;
use RiotQuest\Components\Framework\Endpoints\Summoner;
namespace RiotQuest\Components\Client;

use RiotQuest\Components\Endpoints\Champion;
use RiotQuest\Components\Endpoints\Code;
use RiotQuest\Components\Endpoints\League;
use RiotQuest\Components\Endpoints\Mastery;
use RiotQuest\Components\Endpoints\Match;
use RiotQuest\Components\Endpoints\Spectator;
use RiotQuest\Components\Endpoints\Status;
use RiotQuest\Components\Endpoints\Summoner;
use RiotQuest\Contracts\LeagueException;

/**
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Client;
namespace RiotQuest\Components\Client;

/**
* Class Token
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use RiotQuest\Components\DataProviders\Provider;

Expand All @@ -15,7 +15,7 @@
*
* @package RiotQuest\Components\Framework\Collections
*/
class BannedChampion extends Collection
class BannedChampion extends Collection
{

/**
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class BannedChampionList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class ChampionInfo
Expand Down
@@ -1,11 +1,11 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use Carbon\Carbon;
use Carbon\CarbonInterface;
use RiotQuest\Components\DataProviders\Provider;
use RiotQuest\Components\Framework\Client\Client;
use RiotQuest\Components\Client\Client;
use RiotQuest\Contracts\LeagueException;

/**
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class ChampionMasteryList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use Closure;
use Illuminate\Support\Collection as Module;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use Carbon\Carbon;

Expand Down
@@ -1,9 +1,9 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use RiotQuest\Components\DataProviders\Provider;
use RiotQuest\Components\Framework\Client\Client;
use RiotQuest\Components\Client\Client;
use RiotQuest\Contracts\LeagueException;

/**
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class CurrentGameParticipantList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use Carbon\Carbon;
use Carbon\CarbonInterface;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class FeaturedGameInfoList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class FeaturedGames
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class GameCustomizationObject
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class GameCustomizationObjectList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class Incident
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class IncidentList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class IntList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class League
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use RiotQuest\Client;
use RiotQuest\Contracts\LeagueException;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class LeagueEntryList
Expand Down
@@ -1,8 +1,8 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use RiotQuest\Components\Framework\Client\Client;
use RiotQuest\Components\Client\Client;
use RiotQuest\Contracts\LeagueException;

/**
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class LeagueItemList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class Mastery
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class MasteryList
Expand Down
@@ -1,9 +1,9 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

use Carbon\Carbon;
use RiotQuest\Components\Framework\Client\Client;
use RiotQuest\Components\Client\Client;
use RiotQuest\Contracts\LeagueException;

/**
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class MatchEvent
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class MatchEventList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class MatchFrame
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class MatchFrameList
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace RiotQuest\Components\Framework\Collections;
namespace RiotQuest\Components\Collections;

/**
* Class MatchHistory
Expand Down

0 comments on commit d674b92

Please sign in to comment.