├── .gitignore ├── .scrutinizer.yml ├── .travis.yml ├── src └── LoLApi │ ├── Exception │ ├── InvalidRegionException.php │ ├── UserRateLimitException.php │ ├── ServiceRateLimitException.php │ └── AbstractRateLimitException.php │ ├── Api │ ├── StatusApi.php │ ├── RuneApi.php │ ├── MasteryApi.php │ ├── SpectatorApi.php │ ├── ChampionApi.php │ ├── SummonerApi.php │ ├── ChampionMasteryApi.php │ ├── LeagueApi.php │ ├── BaseApi.php │ ├── MatchApi.php │ └── StaticDataApi.php │ ├── Handler │ └── ClientExceptionHandler.php │ ├── Tests │ ├── Exception │ │ └── AbstractRateLimitExceptionTest.php │ ├── Result │ │ └── ApiResultTest.php │ ├── Api │ │ ├── AbstractApiTest.php │ │ └── BaseApiTest.php │ ├── Handler │ │ └── ClientExceptionHandlerTest.php │ └── ApiClientTest.php │ ├── Result │ └── ApiResult.php │ └── ApiClient.php ├── composer.json ├── phpunit.xml ├── README.md └── composer.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | checks: 2 | php: 3 | code_rating: true 4 | duplication: true 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | dist: trusty 3 | sudo: false 4 | 5 | php: 6 | - 5.6 7 | - 7.0 8 | - 7.1 9 | 10 | before_script: 11 | - composer install 12 | -------------------------------------------------------------------------------- /src/LoLApi/Exception/InvalidRegionException.php: -------------------------------------------------------------------------------- 1 | callApiUrl(self::API_URL_SHARDS, []); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "michaelgarrez/lol-api", 3 | "description": "Wrapper for League of Legends API", 4 | "require": { 5 | "guzzlehttp/guzzle": "^6.0", 6 | "symfony/cache": "^3.2|^4.0" 7 | }, 8 | "keywords": [ 9 | "lol", "api" , "league of legends", "lol api", "library" 10 | ], 11 | "require-dev": { 12 | "phpunit/phpunit": "^5.2", 13 | "predis/predis": "~1.0" 14 | }, 15 | "autoload": { 16 | "psr-0": { "LoLApi": "src/" } 17 | }, 18 | "license": "MIT", 19 | "authors": [ 20 | { 21 | "name": "Michael Garrez", 22 | "email": "michael.garrez@gmail.com" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /src/LoLApi/Api/RuneApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl($url, []); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/LoLApi/Api/MasteryApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl($url, []); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | src/*/Tests 17 | 18 | 19 | 20 | 21 | 22 | src 23 | 24 | src/*/Tests 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/LoLApi/Api/SpectatorApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl(self::API_URL_SPECTATOR_FEATURED, []); 24 | } 25 | 26 | /** 27 | * @param string $summonerId 28 | * 29 | * @return ApiResult 30 | */ 31 | public function getCurrentGameByPlatformIdAndSummonerId($summonerId) 32 | { 33 | $url = str_replace('{summonerId}', $summonerId, self::API_URL_CURRENT_GAME_BY_SUMMONER_ID); 34 | 35 | return $this->callApiUrl($url, []); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/LoLApi/Api/ChampionApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl(self::API_URL_CHAMPIONS_ALL, ['freeToPlay' => json_encode($onlyFreeToPlay)]); 27 | } 28 | 29 | /** 30 | * @param int $championId 31 | * 32 | * @return ApiResult 33 | */ 34 | public function getChampionById($championId) 35 | { 36 | $url = str_replace('{id}', $championId, self::API_URL_CHAMPION_BY_ID); 37 | 38 | return $this->callApiUrl($url, []); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/LoLApi/Exception/AbstractRateLimitException.php: -------------------------------------------------------------------------------- 1 | retryAfter; 26 | } 27 | 28 | /** 29 | * @param string $retryAfter 30 | * 31 | * @return $this 32 | */ 33 | public function setRetryAfter($retryAfter) 34 | { 35 | $this->retryAfter = $retryAfter; 36 | 37 | return $this; 38 | } 39 | 40 | /** 41 | * @return ClientException 42 | */ 43 | public function getClientException() 44 | { 45 | return $this->clientException; 46 | } 47 | 48 | /** 49 | * @param ClientException $clientException 50 | * 51 | * @return $this 52 | */ 53 | public function setClientException(ClientException $clientException) 54 | { 55 | $this->clientException = $clientException; 56 | 57 | return $this; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/LoLApi/Api/SummonerApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl($url, []); 29 | } 30 | 31 | /** 32 | * @param string $summonerId 33 | * 34 | * @return ApiResult 35 | */ 36 | public function getSummonerBySummonerId($encryptedSummonerId) 37 | { 38 | $url = str_replace('{encryptedSummonerId}', $encryptedSummonerId, self::API_URL_SUMMONER_BY_ID); 39 | 40 | return $this->callApiUrl($url, []); 41 | } 42 | 43 | /** 44 | * @param string $accountId 45 | * 46 | * @return ApiResult 47 | */ 48 | public function getSummonerByAccountId($encryptedAccountId) 49 | { 50 | $url = str_replace('{encryptedAccountId}', $encryptedAccountId, self::API_URL_SUMMONER_BY_ACCOUNT_ID); 51 | 52 | return $this->callApiUrl($url, []); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/LoLApi/Handler/ClientExceptionHandler.php: -------------------------------------------------------------------------------- 1 | getResponse()->getStatusCode() === 429) { 30 | return $this->handleRateLimitException($e); 31 | } 32 | 33 | return $e; 34 | } 35 | 36 | /** 37 | * @param ClientException $e 38 | * 39 | * @return AbstractRateLimitException 40 | */ 41 | protected function handleRateLimitException(ClientException $e) 42 | { 43 | if ($e->getResponse()->getHeader(self::HEADER_RATE_LIMIT_TYPE)[0] === self::RATE_LIMIT_TYPE_USER) { 44 | $exception = new UserRateLimitException(); 45 | } else { 46 | $exception = new ServiceRateLimitException(); 47 | } 48 | 49 | return $exception 50 | ->setClientException($e) 51 | ->setRetryAfter($e->getResponse()->getHeader(self::HEADER_RETRY_AFTER)[0]); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/LoLApi/Tests/Exception/AbstractRateLimitExceptionTest.php: -------------------------------------------------------------------------------- 1 | assertEquals($serviceRateLimitException, $serviceRateLimitException->setClientException($clientException)); 29 | $this->assertEquals($clientException, $serviceRateLimitException->getClientException()); 30 | } 31 | 32 | /** 33 | * @covers LoLApi\Exception\ServiceRateLimitException::setRetryAfter 34 | * @covers LoLApi\Exception\ServiceRateLimitException::getRetryAfter 35 | */ 36 | public function testRetryAfter() 37 | { 38 | $serviceRateLimitException = new ServiceRateLimitException(); 39 | $retryAfter = 10; 40 | 41 | $this->assertSame($serviceRateLimitException, $serviceRateLimitException->setRetryAfter($retryAfter)); 42 | $this->assertSame($retryAfter, $serviceRateLimitException->getRetryAfter()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/LoLApi/Api/ChampionMasteryApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl($url, []); 31 | } 32 | 33 | /** 34 | * @param int $summonerId 35 | * @param int $championId 36 | * 37 | * @return ApiResult 38 | */ 39 | public function getChampionMastery($summonerId, $championId) 40 | { 41 | $url = str_replace('{summonerId}', $summonerId, self::API_URL_CHAMPION_MASTERY_BY_CHAMPION_ID); 42 | $url = str_replace('{championId}', $championId, $url); 43 | 44 | return $this->callApiUrl($url, []); 45 | } 46 | 47 | /** 48 | * Get a player's total champion mastery score, which is the sum of individual champion mastery levels 49 | * 50 | * @param int $summonerId 51 | * 52 | * @return ApiResult 53 | */ 54 | public function getChampionsMasteriesScore($summonerId) 55 | { 56 | $url = str_replace('{playerId}', $summonerId, self::API_URL_CHAMPION_MASTERY_SCORE); 57 | 58 | return $this->callApiUrl($url, []); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/LoLApi/Tests/Result/ApiResultTest.php: -------------------------------------------------------------------------------- 1 | assertSame($apiResult, $apiResult->setHttpResponse($response)); 25 | $this->assertSame($response, $apiResult->getHttpResponse()); 26 | } 27 | 28 | /** 29 | * @covers LoLApi\Result\ApiResult::getResult 30 | * @covers LoLApi\Result\ApiResult::setResult 31 | */ 32 | public function testResult() 33 | { 34 | $apiResult = new ApiResult(); 35 | $result = ['test']; 36 | 37 | $this->assertSame($apiResult, $apiResult->setResult($result)); 38 | $this->assertSame($result, $apiResult->getResult()); 39 | } 40 | 41 | /** 42 | * @covers LoLApi\Result\ApiResult::getUrl 43 | * @covers LoLApi\Result\ApiResult::setUrl 44 | */ 45 | public function testUrl() 46 | { 47 | $apiResult = new ApiResult(); 48 | $url = 'http://www.google.com'; 49 | 50 | $this->assertSame($apiResult, $apiResult->setUrl($url)); 51 | $this->assertSame($url, $apiResult->getUrl()); 52 | } 53 | 54 | /** 55 | * @covers LoLApi\Result\ApiResult::isFetchedFromCache 56 | * @covers LoLApi\Result\ApiResult::setFetchedFromCache 57 | */ 58 | public function testFetchedFromCache() 59 | { 60 | $apiResult = new ApiResult(); 61 | 62 | $this->assertFalse($apiResult->isFetchedFromCache()); 63 | $this->assertSame($apiResult, $apiResult->setFetchedFromCache(true)); 64 | $this->assertTrue($apiResult->isFetchedFromCache()); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/LoLApi/Api/LeagueApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl($url, []); 29 | } 30 | 31 | /** 32 | * @param string $gameQueueType (Can be RANKED_SOLO_5x5, RANKED_FLEX_SR, RANKED_FLEX_TT) 33 | * 34 | * @return ApiResult 35 | */ 36 | public function getChallengerLeagues($gameQueueType) 37 | { 38 | $url = str_replace('{queue}', $gameQueueType, self::API_URL_LEAGUE_CHALLENGER); 39 | 40 | return $this->callApiUrl($url, []); 41 | } 42 | 43 | /** 44 | * @param string $gameQueueType (Can be RANKED_SOLO_5x5, RANKED_FLEX_SR, RANKED_FLEX_TT) 45 | * 46 | * @return ApiResult 47 | */ 48 | public function getMasterLeagues($gameQueueType) 49 | { 50 | $url = str_replace('{queue}', $gameQueueType, self::API_URL_LEAGUE_MASTER); 51 | 52 | return $this->callApiUrl($url, []); 53 | } 54 | 55 | /** 56 | * @param string $gameQueueType (Can be RANKED_SOLO_5x5, RANKED_FLEX_SR, RANKED_FLEX_TT) 57 | * 58 | * @return ApiResult 59 | */ 60 | public function getGrandMasterLeagues($gameQueueType) 61 | { 62 | $url = str_replace('{queue}', $gameQueueType, self::API_URL_LEAGUE_MASTER); 63 | 64 | return $this->callApiUrl($url, []); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/LoLApi/Result/ApiResult.php: -------------------------------------------------------------------------------- 1 | httpResponse; 32 | } 33 | 34 | /** 35 | * @param ResponseInterface $httpResponse 36 | * 37 | * @return $this 38 | */ 39 | public function setHttpResponse($httpResponse = null) 40 | { 41 | $this->httpResponse = $httpResponse; 42 | 43 | return $this; 44 | } 45 | 46 | /** 47 | * @return mixed 48 | */ 49 | public function getResult() 50 | { 51 | return $this->result; 52 | } 53 | 54 | /** 55 | * @param mixed $result 56 | * 57 | * @return $this 58 | */ 59 | public function setResult($result) 60 | { 61 | $this->result = $result; 62 | 63 | return $this; 64 | } 65 | 66 | /** 67 | * @return string 68 | */ 69 | public function getUrl() 70 | { 71 | return $this->url; 72 | } 73 | 74 | /** 75 | * @param string $url 76 | * 77 | * @return $this 78 | */ 79 | public function setUrl($url) 80 | { 81 | $this->url = $url; 82 | 83 | return $this; 84 | } 85 | 86 | /** 87 | * @return boolean 88 | */ 89 | public function isFetchedFromCache() 90 | { 91 | return $this->fetchedFromCache; 92 | } 93 | 94 | /** 95 | * @param boolean $fetchedFromCache 96 | * 97 | * @return $this 98 | */ 99 | public function setFetchedFromCache($fetchedFromCache) 100 | { 101 | $this->fetchedFromCache = $fetchedFromCache; 102 | 103 | return $this; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/LoLApi/Tests/Api/AbstractApiTest.php: -------------------------------------------------------------------------------- 1 | apiClient = $this->getApiClient(new ArrayAdapter(), $this->getSuccessfulHttpClient()); 35 | } 36 | 37 | /** 38 | * @param AdapterInterface $cache 39 | * @param Client $httpClient 40 | * 41 | * @return ApiClient 42 | */ 43 | protected function getApiClient(AdapterInterface $cache, Client $httpClient) 44 | { 45 | return new ApiClient(self::REGION, self::API_KEY, $cache, $httpClient); 46 | } 47 | 48 | /** 49 | * @return Client 50 | */ 51 | protected function getSuccessfulHttpClient() 52 | { 53 | $mock = new MockHandler([ 54 | new Response(200, [], json_encode(['success'])), 55 | ]); 56 | 57 | $handler = HandlerStack::create($mock); 58 | 59 | return new Client(['handler' => $handler, 'base_uri' => 'https://' . self::REGION . '.api.pvp.net']); 60 | } 61 | 62 | /** 63 | * @return Client 64 | */ 65 | protected function getRateLimitHttpClient() 66 | { 67 | $mock = new MockHandler([ 68 | new Response( 69 | 429, 70 | [ 71 | ClientExceptionHandler::HEADER_RATE_LIMIT_TYPE => ClientExceptionHandler::RATE_LIMIT_TYPE_SERVICE, 72 | ClientExceptionHandler::HEADER_RETRY_AFTER => 50 73 | ], 74 | json_encode(['failure'] 75 | ) 76 | ), 77 | ]); 78 | 79 | $handler = HandlerStack::create($mock); 80 | 81 | return new Client(['handler' => $handler, 'base_uri' => 'https://' . self::REGION . '.api.pvp.net']); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/LoLApi/Tests/Handler/ClientExceptionHandlerTest.php: -------------------------------------------------------------------------------- 1 | assertSame($clientException, (new ClientExceptionHandler())->handleClientException($clientException)); 27 | } 28 | 29 | /** 30 | * @param string $headerRateLimit 31 | * @param string $exceptionNamespace 32 | * 33 | * @covers LoLApi\Handler\ClientExceptionHandler::handleClientException 34 | * @covers LoLApi\Handler\ClientExceptionHandler::handleRateLimitException 35 | * 36 | * @dataProvider dataProvider 37 | */ 38 | public function testHandleClientExceptionWithRateLimit($headerRateLimit, $exceptionNamespace) 39 | { 40 | $response = new Response( 41 | 429, 42 | [ 43 | ClientExceptionHandler::HEADER_RATE_LIMIT_TYPE => $headerRateLimit, 44 | ClientExceptionHandler::HEADER_RETRY_AFTER => 10 45 | ] 46 | ); 47 | 48 | $clientException = new ClientException('test', new Request('GET', 'test'), $response); 49 | $clientExceptionHandler = new ClientExceptionHandler(); 50 | 51 | $this->assertInstanceOf($exceptionNamespace, $clientExceptionHandler->handleClientException($clientException)); 52 | } 53 | 54 | /** 55 | * @return array 56 | */ 57 | public function dataProvider() 58 | { 59 | return [ 60 | [ 61 | ClientExceptionHandler::RATE_LIMIT_TYPE_USER, 62 | 'LoLApi\Exception\UserRateLimitException' 63 | ], 64 | [ 65 | ClientExceptionHandler::RATE_LIMIT_TYPE_SERVICE, 66 | 'LoLApi\Exception\ServiceRateLimitException' 67 | ] 68 | ]; 69 | } 70 | 71 | /** 72 | * @return array 73 | */ 74 | public function getClientException() 75 | { 76 | return [ 77 | [ 78 | new ClientException('exception', new Request('POST', 'data'), new Response(400)) 79 | ] 80 | ]; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/LoLApi/Api/BaseApi.php: -------------------------------------------------------------------------------- 1 | apiClient = $apiClient; 29 | } 30 | 31 | /** 32 | * @param string $url 33 | * @param array $queryParameters 34 | * 35 | * @return ApiResult 36 | * @throws \LoLApi\Exception\AbstractRateLimitException 37 | */ 38 | protected function callApiUrl($url, array $queryParameters = []) 39 | { 40 | $queryParameters = array_merge(['api_key' => $this->apiClient->getApiKey()], $queryParameters); 41 | $fullUrl = $this->buildUri($url, $queryParameters); 42 | 43 | $cacheKey = md5($fullUrl); 44 | $item = $this->apiClient->getCacheProvider()->getItem($cacheKey); 45 | 46 | if ($item->isHit()) { 47 | return $this->buildApiResult($fullUrl, json_decode($item->get(), true), true); 48 | } 49 | 50 | try { 51 | $response = $this->apiClient->getHttpClient()->get($fullUrl); 52 | 53 | return $this->buildApiResult($fullUrl, json_decode((string) $response->getBody(), true), false, $response); 54 | } catch (ClientException $e) { 55 | throw (new ClientExceptionHandler())->handleClientException($e); 56 | } 57 | } 58 | 59 | /** 60 | * @param string $url 61 | * @param array $queryParameters 62 | * 63 | * @return string 64 | */ 65 | protected function buildUri($url, array $queryParameters) 66 | { 67 | $baseUrl = $this->apiClient->getBaseUrl(); 68 | 69 | return $baseUrl.$url.'?'.http_build_query($queryParameters); 70 | } 71 | 72 | /** 73 | * @param string $fullUrl 74 | * @param mixed $result 75 | * @param bool $fetchedFromCache 76 | * @param ResponseInterface|null $response 77 | * 78 | * @return ApiResult 79 | */ 80 | protected function buildApiResult($fullUrl, $result, $fetchedFromCache, ResponseInterface $response = null) 81 | { 82 | return (new ApiResult()) 83 | ->setResult($result) 84 | ->setUrl($fullUrl) 85 | ->setHttpResponse($response) 86 | ->setFetchedFromCache($fetchedFromCache) 87 | ; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/LoLApi/Api/MatchApi.php: -------------------------------------------------------------------------------- 1 | callApiUrl($url, []); 32 | } 33 | 34 | /** 35 | * @param int $accountId 36 | * @param array $championIds 37 | * @param array $rankedQueues 38 | * @param array $seasons 39 | * @param int $beginTime 40 | * @param int $endTime 41 | * @param int $beginIndex 42 | * @param int $endIndex 43 | * 44 | * @return ApiResult 45 | */ 46 | public function getMatchListByAccountId($accountId, array $championIds = [], array $rankedQueues = [], array $seasons = [], $beginTime = null, $endTime = null, $beginIndex = null, $endIndex = null) 47 | { 48 | $url = str_replace('{accountId}', $accountId, self::API_URL_MATCH_LIST_BY_ACCOUNT); 49 | $queryParameters = []; 50 | 51 | $queryParameters['championIds'] = implode(',', $championIds); 52 | $queryParameters['rankedQueues'] = implode(',', $rankedQueues); 53 | $queryParameters['seasons'] = implode(',', $seasons); 54 | $queryParameters['beginTime'] = $beginTime; 55 | $queryParameters['endTime'] = $endTime; 56 | $queryParameters['beginIndex'] = $beginIndex; 57 | $queryParameters['endIndex'] = $endIndex; 58 | 59 | return $this->callApiUrl($url, array_filter($queryParameters)); 60 | } 61 | 62 | 63 | /** 64 | * Get matchlist for last 20 matches played on given account ID and platform ID. 65 | * 66 | * @throws \Exception 67 | */ 68 | public function getLastMatchlistByAccountId() 69 | { 70 | throw new \Exception("Method not implemented yet"); 71 | } 72 | 73 | /** 74 | * Get match timeline by match ID. 75 | * 76 | * @throws \Exception 77 | */ 78 | public function getTimelineByMatchId() 79 | { 80 | throw new \Exception("Method not implemented yet"); 81 | } 82 | 83 | /** 84 | * Get match IDs by tournament code. 85 | * 86 | * @param string $tournamentCode 87 | * 88 | * @throws \Exception 89 | */ 90 | public function getMatchIdByTournamentCode($tournamentCode) 91 | { 92 | throw new \Exception("Method not implemented yet"); 93 | } 94 | 95 | /** 96 | * Get match by match ID and tournament code. 97 | * 98 | * @param int $matchId 99 | * @param string $tournamentCode 100 | * 101 | * @throws \Exception 102 | */ 103 | public function getMatchByMatchIdAndTournamentCode($matchId, $tournamentCode) 104 | { 105 | throw new \Exception("Method not implemented yet"); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/LoLApi/Tests/ApiClientTest.php: -------------------------------------------------------------------------------- 1 | assertInstanceOf('LoLApi\Api\MatchApi', $apiClient->getMatchApi()); 37 | $this->assertInstanceOf('LoLApi\Api\SummonerApi', $apiClient->getSummonerApi()); 38 | $this->assertInstanceOf('LoLApi\Api\ChampionApi', $apiClient->getChampionApi()); 39 | $this->assertInstanceOf('LoLApi\Api\SpectatorApi', $apiClient->getSpectatorApi()); 40 | $this->assertInstanceOf('LoLApi\Api\MasteryApi', $apiClient->getMasteriesApi()); 41 | $this->assertInstanceOf('LoLApi\Api\RuneApi', $apiClient->getRunesApi()); 42 | $this->assertInstanceOf('LoLApi\Api\StaticDataApi', $apiClient->getStaticDataApi()); 43 | $this->assertInstanceOf('LoLApi\Api\LeagueApi', $apiClient->getLeagueApi()); 44 | $this->assertInstanceOf('LoLApi\Api\StatusApi', $apiClient->getStatusApi()); 45 | $this->assertInstanceOf('LoLApi\Api\ChampionMasteryApi', $apiClient->getChampionMasteryApi()); 46 | } 47 | 48 | /** 49 | * @covers LoLApi\ApiClient::getRegion 50 | * @covers LoLApi\ApiClient::getApiKey 51 | * @covers LoLApi\ApiClient::getHttpClient 52 | * @covers LoLApi\ApiClient::getGlobalUrl 53 | */ 54 | public function testOtherGetters() 55 | { 56 | $apiClient = new ApiClient(ApiClient::REGION_EUW, 'test'); 57 | 58 | $this->assertEquals(self::REGION, $apiClient->getRegion()); 59 | $this->assertEquals(self::API_KEY, $apiClient->getApiKey()); 60 | $this->assertInstanceOf('GuzzleHttp\Client', $apiClient->getHttpClient()); 61 | } 62 | 63 | /** 64 | * @covers LoLApi\ApiClient::setCacheProvider 65 | * @covers LoLApi\ApiClient::getCacheProvider 66 | */ 67 | public function testCacheProvider() 68 | { 69 | $apiClient = new ApiClient(ApiClient::REGION_EUW, 'test'); 70 | 71 | $apiClient->setCacheProvider(new NullAdapter()); 72 | $this->assertInstanceOf(NullAdapter::class, $apiClient->getCacheProvider()); 73 | 74 | $apiClient->setCacheProvider(new ArrayAdapter()); 75 | $this->assertInstanceOf(ArrayAdapter::class, $apiClient->getCacheProvider()); 76 | } 77 | 78 | /** 79 | * @covers LoLApi\ApiClient::cacheApiResult 80 | */ 81 | public function testCacheApiResult() 82 | { 83 | $apiResult = new ApiResult(); 84 | $arrayCache = new ArrayAdapter(); 85 | 86 | $client = new ApiClient(ApiClient::REGION_EUW, 'test', $arrayCache); 87 | 88 | $client->cacheApiResult($apiResult); 89 | } 90 | 91 | /** 92 | * @covers LoLApi\ApiClient::getBaseUrlWithPlatformId 93 | */ 94 | public function testGetBaseUrlWithPlatformId() 95 | { 96 | $apiClient = new ApiClient(ApiClient::REGION_EUW, 'test', null, null); 97 | $class = new \ReflectionClass('LoLApi\ApiClient'); 98 | $method = $class->getMethod('getBaseUrl'); 99 | $method->setAccessible(true); 100 | 101 | $this->assertEquals('https://euw1.api.riotgames.com', $method->invoke($apiClient, true)); 102 | } 103 | 104 | /** 105 | * @covers LoLApi\ApiClient::__construct 106 | * 107 | * @expectedException \LoLApi\Exception\InvalidRegionException 108 | */ 109 | public function testInvalidRegion() 110 | { 111 | new ApiClient('test', 'test'); 112 | } 113 | 114 | /** 115 | * @covers LoLApi\ApiClient::__construct 116 | */ 117 | public function testConstructWithClient() 118 | { 119 | $httpClient = new Client(); 120 | $apiClient = new ApiClient(ApiClient::REGION_EUW, 'test', new NullAdapter(), $httpClient); 121 | 122 | $this->assertSame($httpClient, $apiClient->getHttpClient()); 123 | } 124 | 125 | /** 126 | * @covers LoLApi\ApiClient::__construct 127 | */ 128 | public function testConstruct() 129 | { 130 | $apiClient = new ApiClient(ApiClient::REGION_EUW, 'test', new NullAdapter()); 131 | 132 | $this->assertInstanceOf('GuzzleHttp\Client', $apiClient->getHttpClient()); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## League of Legends API wrapper in PHP 2 | 3 | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Babacooll/lol-api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Babacooll/lol-api/?branch=master) 4 | [![Code Coverage](https://scrutinizer-ci.com/g/Babacooll/lol-api/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Babacooll/lol-api/?branch=master) 5 | [![Build Status](https://scrutinizer-ci.com/g/Babacooll/lol-api/badges/build.png?b=master)](https://scrutinizer-ci.com/g/Babacooll/lol-api/build-status/master) 6 | [![Build Status](https://travis-ci.org/Babacooll/lol-api.svg?branch=master)](https://travis-ci.org/Babacooll/lol-api) 7 | [![SensioLabsInsight](https://insight.sensiolabs.com/projects/50170931-8848-4440-9e6c-37d9378986b9/mini.png)](https://insight.sensiolabs.com/projects/50170931-8848-4440-9e6c-37d9378986b9) 8 | [![Latest Stable Version](https://poser.pugx.org/michaelgarrez/lol-api/v/stable)](https://packagist.org/packages/michaelgarrez/lol-api) 9 | [![Total Downloads](https://poser.pugx.org/michaelgarrez/lol-api/downloads)](https://packagist.org/packages/michaelgarrez/lol-api) 10 | [![Latest Unstable Version](https://poser.pugx.org/michaelgarrez/lol-api/v/unstable)](https://packagist.org/packages/michaelgarrez/lol-api) 11 | [![License](https://poser.pugx.org/michaelgarrez/lol-api/license)](https://packagist.org/packages/michaelgarrez/lol-api) 12 | [![Dependency Status](https://www.versioneye.com/user/projects/55e5aa1a8c0f62001c000356/badge.svg?style=flat)](https://www.versioneye.com/user/projects/55e5aa1a8c0f62001c000356) 13 | 14 | ### Introduction 15 | 16 | Simple PHP wrapper for [League of legends API](https://developer.riotgames.com/api/methods). 17 | 18 | This library implements two custom exceptions to catch your API rate limits (ServiceRateLimitException && UserRateLimitException). 19 | 20 | It also implements [Doctrine cache](https://github.com/doctrine/cache) to cache the API results into your favorite cache driver. 21 | 22 | ### Migration from 0.* to 1.* 23 | 24 | Three main features breaking BC caused a bump to the 1.* version: 25 | * Cache implementation 26 | * AbstractRateLimitException 27 | * Return of an ApiResult object instead of an array 28 | 29 | Only the third one can actually break BC. You should now use the **getResult()** method on the ApiResult object returned. 30 | 31 | ### How to use 32 | 33 | #### Basic use 34 | 35 | You first have to select the API you want to fetch from and then the specific method. 36 | Each call will return an **ApiResult** object containing the URL called, the Guzzle Response object and an array containing the API result. 37 | 38 | To get the result you can call the method **getResult()** on the ApiResult object. 39 | 40 | ```php 41 | $apiClient = new \LoLApi\ApiClient(\LoLApi\ApiClient::REGION_EUW, 'my-key'); 42 | 43 | $apiClient->getMatchApi()->getMatchListBySummonerId(2); 44 | $apiClient->getMatchApi()->getMatchByMatchId(2, true); 45 | $apiClient->getSummonerApi()->getSummonerBySummonerName('MySummonerName'); 46 | $apiClient->getSummonerApi()->getSummonerBySummonerId(2); 47 | $apiClient->getMasteriesApi()->getMasteriesBySummonerId(2); 48 | $apiClient->getRunesApi()->getRunesBySummonerId(2); 49 | $apiClient->getSummonerApi()->getSummonerNameBySummonerId(2); 50 | $apiClient->getChampionApi()->getChampionById(20); 51 | $apiClient->getFeaturedGamesApi()->getFeaturedGames(); 52 | $apiClient->getStatsApi()->getRankedStatsBySummonerId(2); 53 | $apiClient->getGameApi()->getRecentGamesBySummonerId(2); 54 | $apiClient->getSpectatorApi()->getCurrentGameByPlatformIdAndSummonerId('EUW1', 2); 55 | ``` 56 | 57 | #### Use cache 58 | 59 | By default Symfony NullAdapter cache is used. You can specify another Cache Adapter (implementing PSR6 Adapters) to the ApiClient. 60 | 61 | Example with Predis : 62 | 63 | ```php 64 | use Symfony\Component\Cache\Adapter\RedisAdapter; 65 | 66 | $client = new \Predis\Client([ 67 | 'scheme' => 'tcp', 68 | 'host' => '127.0.0.1', 69 | 'port' => 6379, 70 | ]); 71 | 72 | $redisAdapter = new RedisAdapter($client); 73 | 74 | $apiClient->setCacheProvider($redisAdapter); 75 | 76 | // This will call the API and return to you an ApiResult object 77 | $result = $apiClient->getSummonerApi()->getSummonerBySummonerName('MySummonerName'); 78 | 79 | // Let's cache this result for 60 seconds into Redis 80 | $apiClient->cacheApiResult($result, 60); 81 | 82 | // This will fetch the data from Redis and return to you an ApiResult object 83 | $result = $apiClient->getSummonerApi()->getSummonerBySummonerName('MySummonerName'); 84 | ``` 85 | 86 | The default ttl value **cacheApiResult()** method is 60 seconds. 87 | 88 | #### Rate limit 89 | 90 | When you reach the rate limit (User or Service) the library will throw you an implementation of the AbstractRateLimitException. You can get the type of rate limit and the time to wait before a new call (Riot is very strict on the rate limit respect). 91 | 92 | Example with a sleep : 93 | 94 | ```php 95 | $apiClient = new \LoLApi\ApiClient(\LoLApi\ApiClient::REGION_EUW, 'my-key'); 96 | 97 | for ($i = 0; $i < 100; $i++) { 98 | try { 99 | $apiClient->getMatchApi()->getMatchListByAccountId(2); 100 | } catch (AbstractRateLimitException $e) { 101 | sleep($e->getRetryAfter()); 102 | } 103 | } 104 | ``` 105 | 106 | ### API implemented 107 | 108 | | API | Version | 109 | | ------------- |-------------| 110 | | [Summoner API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v4-latest-green.svg)| 111 | | [Match API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-missing_methods-orange.svg)| 112 | | [Champion API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-latest-green.svg)| 113 | | [Spetactor API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-latest-green.svg)| 114 | | [Static Data API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-latest-green.svg)| 115 | | [League API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v4-latest-green.svg)| 116 | | [Status API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-latest-green.svg)| 117 | | [Champion Mastery API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-latest-green.svg)| 118 | | [Masteries API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-latest-green.svg)| 119 | | [Runes API](https://developer.riotgames.com/api-methods/) | ![v3](https://img.shields.io/badge/v3-latest-green.svg)| 120 | 121 | ### Contributing 122 | 123 | Please create issues if you have any problem with this library integration. 124 | 125 | If you want to contribute, create a PR, you must respect PSR-2 and your code must be tested. 126 | 127 | Thank you ! 128 | -------------------------------------------------------------------------------- /src/LoLApi/ApiClient.php: -------------------------------------------------------------------------------- 1 | self::REGION_BR_ID, 72 | self::REGION_EUNE => self::REGION_EUNE_ID, 73 | self::REGION_EUW => self::REGION_EUW_ID, 74 | self::REGION_JP => self::REGION_JP_ID, 75 | self::REGION_KR => self::REGION_KR_ID, 76 | self::REGION_LAN => self::REGION_LAN_ID, 77 | self::REGION_LAS => self::REGION_LAS_ID, 78 | self::REGION_NA => self::REGION_NA_ID, 79 | self::REGION_OCE => self::REGION_OCE_ID, 80 | self::REGION_RU => self::REGION_RU_ID, 81 | self::REGION_TR => self::REGION_TR_ID, 82 | ]; 83 | 84 | /** 85 | * @var string 86 | */ 87 | protected $region; 88 | 89 | /** 90 | * @var string 91 | */ 92 | protected $apiKey; 93 | 94 | /** 95 | * @var Client 96 | */ 97 | protected $httpClient; 98 | 99 | /** 100 | * @var AdapterInterface 101 | */ 102 | protected $cacheProvider; 103 | 104 | /** 105 | * @param string $region 106 | * @param string $apiKey 107 | * @param AdapterInterface $cache 108 | * @param Client $client 109 | * 110 | * @throws InvalidRegionException 111 | */ 112 | public function __construct($region, $apiKey, AdapterInterface $cache = null, Client $client = null) 113 | { 114 | if (!in_array($region, self::$availableRegions)) { 115 | throw new InvalidRegionException(sprintf('Invalid region %s', $region)); 116 | } 117 | 118 | $this->region = $region; 119 | $this->httpClient = $client ? $client : new Client(); 120 | $this->apiKey = $apiKey; 121 | $this->cache = $cache ? $cache : new NullAdapter(); 122 | } 123 | 124 | /** 125 | * @param AdapterInterface $cache 126 | */ 127 | public function setCacheProvider(AdapterInterface $cache) 128 | { 129 | $this->cache = $cache; 130 | } 131 | 132 | /** 133 | * @return AdapterInterface 134 | */ 135 | public function getCacheProvider() 136 | { 137 | return $this->cache; 138 | } 139 | 140 | /** 141 | * @return Client 142 | */ 143 | public function getHttpClient() 144 | { 145 | return $this->httpClient; 146 | } 147 | 148 | /** 149 | * @return string 150 | */ 151 | public function getRegion() 152 | { 153 | return $this->region; 154 | } 155 | 156 | /** 157 | * @return string 158 | */ 159 | public function getApiKey() 160 | { 161 | return $this->apiKey; 162 | } 163 | 164 | /** 165 | * @return MatchApi 166 | */ 167 | public function getMatchApi() 168 | { 169 | return new MatchApi($this); 170 | } 171 | 172 | /** 173 | * @return SummonerApi 174 | */ 175 | public function getSummonerApi() 176 | { 177 | return new SummonerApi($this); 178 | } 179 | 180 | /** 181 | * @return ChampionApi 182 | */ 183 | public function getChampionApi() 184 | { 185 | return new ChampionApi($this); 186 | } 187 | 188 | /** 189 | * @return SpectatorApi 190 | */ 191 | public function getFeaturedGamesApi() 192 | { 193 | return new SpectatorApi($this); 194 | } 195 | 196 | /** 197 | * @return MasteryApi 198 | */ 199 | public function getMasteriesApi() 200 | { 201 | return new MasteryApi($this); 202 | } 203 | 204 | /** 205 | * @return RuneApi 206 | */ 207 | public function getRunesApi() 208 | { 209 | return new RuneApi($this); 210 | } 211 | 212 | /** 213 | * @return SpectatorApi 214 | */ 215 | public function getSpectatorApi() 216 | { 217 | return new SpectatorApi($this); 218 | } 219 | 220 | /** 221 | * @return LeagueApi 222 | */ 223 | public function getLeagueApi() 224 | { 225 | return new LeagueApi($this); 226 | } 227 | 228 | /** 229 | * @return StaticDataApi 230 | */ 231 | public function getStaticDataApi() 232 | { 233 | return new StaticDataApi($this); 234 | } 235 | 236 | /** 237 | * @return StatusApi 238 | */ 239 | public function getStatusApi() 240 | { 241 | return new StatusApi($this); 242 | } 243 | 244 | /** 245 | * @return ChampionMasteryApi 246 | */ 247 | public function getChampionMasteryApi() 248 | { 249 | return new ChampionMasteryApi($this); 250 | } 251 | 252 | /** 253 | * @return string 254 | */ 255 | public function getBaseUrl() 256 | { 257 | return 'https://'.self::$regionsWithIds[$this->region].'.api.riotgames.com'; 258 | } 259 | 260 | /** 261 | * @param ApiResult $apiResult 262 | * @param int $ttl 263 | */ 264 | public function cacheApiResult(ApiResult $apiResult, $ttl = 60) 265 | { 266 | $cacheKey = md5($apiResult->getUrl()); 267 | 268 | $item = $this->cache->getItem($cacheKey); 269 | 270 | if (!$item->isHit()) { 271 | $item->set(json_encode($apiResult->getResult())); 272 | $item->expiresAfter($ttl); 273 | $this->cache->save($item); 274 | } 275 | } 276 | } 277 | -------------------------------------------------------------------------------- /src/LoLApi/Tests/Api/BaseApiTest.php: -------------------------------------------------------------------------------- 1 | apiClient->{$api}(); 39 | 40 | $this->assertSame(['success'], call_user_func_array([$api, $method], $options)->getResult()); 41 | } 42 | 43 | /** 44 | * @covers LoLApi\Api\BaseApi::callApiUrl 45 | */ 46 | public function testWithCachedResult() 47 | { 48 | $arrayCache = new ArrayAdapter(); 49 | 50 | $item = $arrayCache->getItem('foo'); 51 | $item->set('{}'); 52 | $arrayCache->save($item); 53 | 54 | $fooItem = $arrayCache->getItem('foo'); 55 | $this->assertTrue($fooItem->isHit()); 56 | $this->assertEquals('{}', $fooItem->get()); 57 | 58 | $apiClient = $this->getApiClient($arrayCache, $this->getSuccessfulHttpClient()); 59 | 60 | $apiClient->getSpectatorApi()->getCurrentGameByPlatformIdAndSummonerId(5); 61 | } 62 | 63 | /** 64 | * @covers LoLApi\Api\BaseApi::callApiUrl 65 | * 66 | * @expectedException \LoLApi\Exception\ServiceRateLimitException 67 | */ 68 | public function testWithRateLimitException() 69 | { 70 | $apiClient = $this->getApiClient(new ArrayAdapter(), $this->getRateLimitHttpClient()); 71 | 72 | $apiClient->getSpectatorApi()->getCurrentGameByPlatformIdAndSummonerId(5); 73 | } 74 | 75 | /** 76 | * @return array 77 | */ 78 | public function dataProvider() 79 | { 80 | return array_merge($this->getDataProvider1(), $this->getDataProvider2(), $this->getDataProvider3(), $this->getDataProvider4(), $this->getDataProvider5(), $this->getDataProvider6()); 81 | } 82 | 83 | /** 84 | * @return array 85 | */ 86 | protected function getDataProvider1() 87 | { 88 | return [ 89 | [ 90 | 'getSpectatorApi', 91 | 'getCurrentGameByPlatformIdAndSummonerId', 92 | [ 93 | 5 94 | ] 95 | ], 96 | ]; 97 | } 98 | 99 | /** 100 | * @return array 101 | */ 102 | protected function getDataProvider2() 103 | { 104 | return [ 105 | [ 106 | 'getMatchApi', 107 | 'getMatchListByAccountId', 108 | [ 109 | 5 110 | ] 111 | ], 112 | [ 113 | 'getChampionApi', 114 | 'getAllChampions', 115 | ], 116 | [ 117 | 'getChampionApi', 118 | 'getChampionById', 119 | [ 120 | 5 121 | ] 122 | ], 123 | [ 124 | 'getFeaturedGamesApi', 125 | 'getFeaturedGames' 126 | ], 127 | [ 128 | 'getMatchApi', 129 | 'getMatchByMatchId', 130 | [ 131 | 5 132 | ] 133 | ], 134 | [ 135 | 'getSummonerApi', 136 | 'getSummonerBySummonerName', 137 | [ 138 | 'test' 139 | ] 140 | ], 141 | [ 142 | 'getSummonerApi', 143 | 'getSummonerBySummonerId', 144 | [ 145 | 5 146 | ] 147 | ], 148 | [ 149 | 'getSummonerApi', 150 | 'getSummonerByAccountId', 151 | [ 152 | 5 153 | ] 154 | ], 155 | ]; 156 | } 157 | 158 | /** 159 | * @return array 160 | */ 161 | protected function getDataProvider3() 162 | { 163 | return [ 164 | [ 165 | 'getStaticDataApi', 166 | 'getChampions', 167 | ], 168 | [ 169 | 'getStaticDataApi', 170 | 'getChampionById', 171 | [ 172 | 5 173 | ] 174 | ], 175 | [ 176 | 'getStaticDataApi', 177 | 'getChampionById', 178 | [ 179 | 5 180 | ] 181 | ], 182 | [ 183 | 'getStaticDataApi', 184 | 'getItems' 185 | ], 186 | [ 187 | 'getStaticDataApi', 188 | 'getItemById', 189 | [ 190 | 5 191 | ] 192 | ], 193 | [ 194 | 'getStaticDataApi', 195 | 'getLanguageStrings' 196 | ], 197 | [ 198 | 'getStaticDataApi', 199 | 'getLanguages' 200 | ], 201 | [ 202 | 'getStaticDataApi', 203 | 'getMap' 204 | ] 205 | ]; 206 | } 207 | 208 | /** 209 | * @return array 210 | */ 211 | protected function getDataProvider4() 212 | { 213 | return [ 214 | [ 215 | 'getStaticDataApi', 216 | 'getMasteries' 217 | ], 218 | [ 219 | 'getStaticDataApi', 220 | 'getMasteryById', 221 | [ 222 | 5 223 | ] 224 | ], 225 | [ 226 | 'getStaticDataApi', 227 | 'getRealms' 228 | ], 229 | [ 230 | 'getStaticDataApi', 231 | 'getRunes' 232 | ], 233 | [ 234 | 'getStaticDataApi', 235 | 'getRuneById', 236 | [ 237 | 5, 238 | 'fr', 239 | 'v1.2' 240 | ] 241 | ], 242 | [ 243 | 'getStaticDataApi', 244 | 'getVersions' 245 | ], 246 | [ 247 | 'getStaticDataApi', 248 | 'getSummonerSpells' 249 | ], 250 | [ 251 | 'getStaticDataApi', 252 | 'getSummonerSpellById', 253 | [ 254 | 5 255 | ] 256 | ] 257 | ]; 258 | } 259 | 260 | /** 261 | * @return array 262 | */ 263 | protected function getDataProvider5() 264 | { 265 | return [ 266 | [ 267 | 'getLeagueApi', 268 | 'getLeaguePositionsBySummonerId', 269 | [ 270 | 5 271 | ] 272 | ], 273 | [ 274 | 'getLeagueApi', 275 | 'getChallengerLeagues', 276 | [ 277 | 'RANKED_SOLO_5x5' 278 | ] 279 | ], 280 | [ 281 | 'getLeagueApi', 282 | 'getMasterLeagues', 283 | [ 284 | 'RANKED_SOLO_5x5' 285 | ] 286 | ] 287 | ]; 288 | } 289 | 290 | /** 291 | * @return array 292 | */ 293 | protected function getDataProvider6() 294 | { 295 | return [ 296 | [ 297 | 'getStatusApi', 298 | 'getShards' 299 | ], 300 | [ 301 | 'getChampionMasteryApi', 302 | 'getChampionMastery', 303 | [ 304 | 5, 305 | 5 306 | ] 307 | ], 308 | [ 309 | 'getChampionMasteryApi', 310 | 'getChampionsMasteries', 311 | [ 312 | 5 313 | ] 314 | ], 315 | [ 316 | 'getChampionMasteryApi', 317 | 'getChampionsMasteriesScore', 318 | [ 319 | 5 320 | ] 321 | ], 322 | ]; 323 | } 324 | } 325 | -------------------------------------------------------------------------------- /src/LoLApi/Api/StaticDataApi.php: -------------------------------------------------------------------------------- 1 | handleQueryParametersForLocaleAndVersion($locale, $version, ['dataById' => (string) $dataById, 'champData' => implode(',', $champData)]); 42 | 43 | return $this->callApiUrl(self::API_URL_STATIC_DATA_CHAMPIONS, array_filter($queryParameters)); 44 | } 45 | 46 | /** 47 | * @param int $championId 48 | * @param string $locale 49 | * @param string $version 50 | * @param array $champData 51 | * 52 | * @return ApiResult|null 53 | */ 54 | public function getChampionById($championId, $locale = null, $version = null, array $champData = []) 55 | { 56 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['champData' => implode(',', $champData)]); 57 | 58 | return $this->callApiUrl(str_replace('{id}', $championId, self::API_URL_STATIC_DATA_CHAMPION_BY_ID), array_filter($queryParameters)); 59 | } 60 | 61 | /** 62 | * @param string $locale 63 | * @param string $version 64 | * 65 | * @return ApiResult|null 66 | */ 67 | public function getItems($locale = null, $version = null) 68 | { 69 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version); 70 | 71 | return $this->callApiUrl(self::API_URL_STATIC_DATA_ITEMS, array_filter($queryParameters)); 72 | } 73 | 74 | /** 75 | * @param int $itemId 76 | * @param string $locale 77 | * @param string $version 78 | * @param array $itemData 79 | * 80 | * @return ApiResult|null 81 | */ 82 | public function getItemById($itemId, $locale = null, $version = null, array $itemData = []) 83 | { 84 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['itemData' => implode(',', $itemData)]); 85 | 86 | return $this->callApiUrl(str_replace('{id}', $itemId, self::API_URL_STATIC_DATA_ITEM_BY_ID), array_filter($queryParameters)); 87 | } 88 | 89 | /** 90 | * @param string $locale 91 | * @param string $version 92 | * 93 | * @return ApiResult|null 94 | */ 95 | public function getLanguageStrings($locale = null, $version = null) 96 | { 97 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version); 98 | 99 | return $this->callApiUrl(self::API_URL_STATIC_DATA_LANGUAGE_STRINGS, array_filter($queryParameters)); 100 | } 101 | 102 | /** 103 | * @return ApiResult|null 104 | */ 105 | public function getLanguages() 106 | { 107 | return $this->callApiUrl(self::API_URL_STATIC_DATA_LANGUAGES, []); 108 | } 109 | 110 | /** 111 | * @param string $locale 112 | * @param string $version 113 | * 114 | * @return ApiResult|null 115 | */ 116 | public function getMap($locale = null, $version = null) 117 | { 118 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version); 119 | 120 | return $this->callApiUrl(self::API_URL_STATIC_DATA_MAP, array_filter($queryParameters)); 121 | } 122 | 123 | /** 124 | * @param string $locale 125 | * @param string $version 126 | * @param array $masteryListData 127 | * 128 | * @return ApiResult|null 129 | */ 130 | public function getMasteries($locale = null, $version = null, array $masteryListData = []) 131 | { 132 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['masteryListData' => implode(',', $masteryListData)]); 133 | 134 | return $this->callApiUrl(self::API_URL_STATIC_DATA_MASTERIES, array_filter($queryParameters)); 135 | } 136 | 137 | /** 138 | * @param int $masteryId 139 | * @param string $locale 140 | * @param string $version 141 | * @param array $masteryData 142 | * 143 | * @return ApiResult|null 144 | */ 145 | public function getMasteryById($masteryId, $locale = null, $version = null, array $masteryData = []) 146 | { 147 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['masteryData' => implode(',', $masteryData)]); 148 | 149 | return $this->callApiUrl(str_replace('{id}', $masteryId, self::API_URL_STATIC_DATA_MASTERY_BY_ID), array_filter($queryParameters)); 150 | } 151 | 152 | /** 153 | * @return ApiResult|null 154 | */ 155 | public function getRealms() 156 | { 157 | return $this->callApiUrl(self::API_URL_STATIC_DATA_REALM, []); 158 | } 159 | 160 | /** 161 | * @param string $locale 162 | * @param string $version 163 | * @param array $runeListData 164 | * 165 | * @return ApiResult|null 166 | */ 167 | public function getRunes($locale = null, $version = null, array $runeListData = []) 168 | { 169 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['runeListData' => implode(',', $runeListData)]); 170 | 171 | return $this->callApiUrl(self::API_URL_STATIC_DATA_RUNES, array_filter($queryParameters)); 172 | } 173 | 174 | /** 175 | * @param int $runeId 176 | * @param string $locale 177 | * @param string $version 178 | * @param array $runeData 179 | * 180 | * @return ApiResult|null 181 | */ 182 | public function getRuneById($runeId, $locale = null, $version = null, array $runeData = []) 183 | { 184 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['runeData' => implode(',', $runeData)]); 185 | 186 | return $this->callApiUrl(str_replace('{id}', $runeId, self::API_URL_STATIC_DATA_RUNE_BY_ID), array_filter($queryParameters)); 187 | } 188 | 189 | /** 190 | * @param string $locale 191 | * @param string $version 192 | * @param bool $dataById 193 | * @param array $spellData 194 | * 195 | * @return ApiResult|null 196 | */ 197 | public function getSummonerSpells($locale = null, $version = null, $dataById = false, array $spellData = []) 198 | { 199 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['dataById' => (string) $dataById, 'spellData' => implode(',', $spellData)]); 200 | 201 | return $this->callApiUrl(self::API_URL_STATIC_DATA_SUMMONER_SPELLS, array_filter($queryParameters)); 202 | } 203 | 204 | /** 205 | * @param int $summonerSpellId 206 | * @param string $locale 207 | * @param string $version 208 | * @param array $spellData 209 | * 210 | * @return ApiResult|null 211 | */ 212 | public function getSummonerSpellById($summonerSpellId, $locale = null, $version = null, array $spellData = []) 213 | { 214 | $queryParameters = $this->handleQueryParametersForLocaleAndVersion($locale, $version, ['spellData' => implode(',', $spellData)]); 215 | 216 | return $this->callApiUrl(str_replace('{id}', $summonerSpellId, self::API_URL_STATIC_DATA_SUMMONER_SPELL_BY_ID), array_filter($queryParameters)); 217 | } 218 | 219 | /** 220 | * @return ApiResult|null 221 | */ 222 | public function getVersions() 223 | { 224 | return $this->callApiUrl(self::API_URL_STATIC_DATA_VERSIONS, []); 225 | } 226 | 227 | /** 228 | * @param string $locale 229 | * @param string $version 230 | * @param array $otherParameters 231 | * 232 | * @return array 233 | */ 234 | protected function handleQueryParametersForLocaleAndVersion($locale = null, $version = null, $otherParameters = []) 235 | { 236 | $queryParameters = []; 237 | 238 | if ($locale !== null) { 239 | $queryParameters['locale'] = (string) $locale; 240 | } 241 | if ($version !== null) { 242 | $queryParameters['version'] = (string) $version; 243 | } 244 | 245 | return array_merge($queryParameters, $otherParameters); 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "9c2a428b720d9fdfeaace890f369ef45", 8 | "content-hash": "7aeac186d56f3be53d88d831db193d09", 9 | "packages": [ 10 | { 11 | "name": "guzzlehttp/guzzle", 12 | "version": "6.2.3", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/guzzle/guzzle.git", 16 | "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", 21 | "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "guzzlehttp/promises": "^1.0", 26 | "guzzlehttp/psr7": "^1.4", 27 | "php": ">=5.5" 28 | }, 29 | "require-dev": { 30 | "ext-curl": "*", 31 | "phpunit/phpunit": "^4.0", 32 | "psr/log": "^1.0" 33 | }, 34 | "type": "library", 35 | "extra": { 36 | "branch-alias": { 37 | "dev-master": "6.2-dev" 38 | } 39 | }, 40 | "autoload": { 41 | "files": [ 42 | "src/functions_include.php" 43 | ], 44 | "psr-4": { 45 | "GuzzleHttp\\": "src/" 46 | } 47 | }, 48 | "notification-url": "https://packagist.org/downloads/", 49 | "license": [ 50 | "MIT" 51 | ], 52 | "authors": [ 53 | { 54 | "name": "Michael Dowling", 55 | "email": "mtdowling@gmail.com", 56 | "homepage": "https://github.com/mtdowling" 57 | } 58 | ], 59 | "description": "Guzzle is a PHP HTTP client library", 60 | "homepage": "http://guzzlephp.org/", 61 | "keywords": [ 62 | "client", 63 | "curl", 64 | "framework", 65 | "http", 66 | "http client", 67 | "rest", 68 | "web service" 69 | ], 70 | "time": "2017-02-28 22:50:30" 71 | }, 72 | { 73 | "name": "guzzlehttp/promises", 74 | "version": "v1.3.1", 75 | "source": { 76 | "type": "git", 77 | "url": "https://github.com/guzzle/promises.git", 78 | "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" 79 | }, 80 | "dist": { 81 | "type": "zip", 82 | "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", 83 | "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", 84 | "shasum": "" 85 | }, 86 | "require": { 87 | "php": ">=5.5.0" 88 | }, 89 | "require-dev": { 90 | "phpunit/phpunit": "^4.0" 91 | }, 92 | "type": "library", 93 | "extra": { 94 | "branch-alias": { 95 | "dev-master": "1.4-dev" 96 | } 97 | }, 98 | "autoload": { 99 | "psr-4": { 100 | "GuzzleHttp\\Promise\\": "src/" 101 | }, 102 | "files": [ 103 | "src/functions_include.php" 104 | ] 105 | }, 106 | "notification-url": "https://packagist.org/downloads/", 107 | "license": [ 108 | "MIT" 109 | ], 110 | "authors": [ 111 | { 112 | "name": "Michael Dowling", 113 | "email": "mtdowling@gmail.com", 114 | "homepage": "https://github.com/mtdowling" 115 | } 116 | ], 117 | "description": "Guzzle promises library", 118 | "keywords": [ 119 | "promise" 120 | ], 121 | "time": "2016-12-20 10:07:11" 122 | }, 123 | { 124 | "name": "guzzlehttp/psr7", 125 | "version": "1.4.2", 126 | "source": { 127 | "type": "git", 128 | "url": "https://github.com/guzzle/psr7.git", 129 | "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" 130 | }, 131 | "dist": { 132 | "type": "zip", 133 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", 134 | "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", 135 | "shasum": "" 136 | }, 137 | "require": { 138 | "php": ">=5.4.0", 139 | "psr/http-message": "~1.0" 140 | }, 141 | "provide": { 142 | "psr/http-message-implementation": "1.0" 143 | }, 144 | "require-dev": { 145 | "phpunit/phpunit": "~4.0" 146 | }, 147 | "type": "library", 148 | "extra": { 149 | "branch-alias": { 150 | "dev-master": "1.4-dev" 151 | } 152 | }, 153 | "autoload": { 154 | "psr-4": { 155 | "GuzzleHttp\\Psr7\\": "src/" 156 | }, 157 | "files": [ 158 | "src/functions_include.php" 159 | ] 160 | }, 161 | "notification-url": "https://packagist.org/downloads/", 162 | "license": [ 163 | "MIT" 164 | ], 165 | "authors": [ 166 | { 167 | "name": "Michael Dowling", 168 | "email": "mtdowling@gmail.com", 169 | "homepage": "https://github.com/mtdowling" 170 | }, 171 | { 172 | "name": "Tobias Schultze", 173 | "homepage": "https://github.com/Tobion" 174 | } 175 | ], 176 | "description": "PSR-7 message implementation that also provides common utility methods", 177 | "keywords": [ 178 | "http", 179 | "message", 180 | "request", 181 | "response", 182 | "stream", 183 | "uri", 184 | "url" 185 | ], 186 | "time": "2017-03-20 17:10:46" 187 | }, 188 | { 189 | "name": "psr/cache", 190 | "version": "1.0.1", 191 | "source": { 192 | "type": "git", 193 | "url": "https://github.com/php-fig/cache.git", 194 | "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" 195 | }, 196 | "dist": { 197 | "type": "zip", 198 | "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", 199 | "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", 200 | "shasum": "" 201 | }, 202 | "require": { 203 | "php": ">=5.3.0" 204 | }, 205 | "type": "library", 206 | "extra": { 207 | "branch-alias": { 208 | "dev-master": "1.0.x-dev" 209 | } 210 | }, 211 | "autoload": { 212 | "psr-4": { 213 | "Psr\\Cache\\": "src/" 214 | } 215 | }, 216 | "notification-url": "https://packagist.org/downloads/", 217 | "license": [ 218 | "MIT" 219 | ], 220 | "authors": [ 221 | { 222 | "name": "PHP-FIG", 223 | "homepage": "http://www.php-fig.org/" 224 | } 225 | ], 226 | "description": "Common interface for caching libraries", 227 | "keywords": [ 228 | "cache", 229 | "psr", 230 | "psr-6" 231 | ], 232 | "time": "2016-08-06 20:24:11" 233 | }, 234 | { 235 | "name": "psr/http-message", 236 | "version": "1.0.1", 237 | "source": { 238 | "type": "git", 239 | "url": "https://github.com/php-fig/http-message.git", 240 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" 241 | }, 242 | "dist": { 243 | "type": "zip", 244 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", 245 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", 246 | "shasum": "" 247 | }, 248 | "require": { 249 | "php": ">=5.3.0" 250 | }, 251 | "type": "library", 252 | "extra": { 253 | "branch-alias": { 254 | "dev-master": "1.0.x-dev" 255 | } 256 | }, 257 | "autoload": { 258 | "psr-4": { 259 | "Psr\\Http\\Message\\": "src/" 260 | } 261 | }, 262 | "notification-url": "https://packagist.org/downloads/", 263 | "license": [ 264 | "MIT" 265 | ], 266 | "authors": [ 267 | { 268 | "name": "PHP-FIG", 269 | "homepage": "http://www.php-fig.org/" 270 | } 271 | ], 272 | "description": "Common interface for HTTP messages", 273 | "homepage": "https://github.com/php-fig/http-message", 274 | "keywords": [ 275 | "http", 276 | "http-message", 277 | "psr", 278 | "psr-7", 279 | "request", 280 | "response" 281 | ], 282 | "time": "2016-08-06 14:39:51" 283 | }, 284 | { 285 | "name": "psr/log", 286 | "version": "1.0.2", 287 | "source": { 288 | "type": "git", 289 | "url": "https://github.com/php-fig/log.git", 290 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" 291 | }, 292 | "dist": { 293 | "type": "zip", 294 | "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 295 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 296 | "shasum": "" 297 | }, 298 | "require": { 299 | "php": ">=5.3.0" 300 | }, 301 | "type": "library", 302 | "extra": { 303 | "branch-alias": { 304 | "dev-master": "1.0.x-dev" 305 | } 306 | }, 307 | "autoload": { 308 | "psr-4": { 309 | "Psr\\Log\\": "Psr/Log/" 310 | } 311 | }, 312 | "notification-url": "https://packagist.org/downloads/", 313 | "license": [ 314 | "MIT" 315 | ], 316 | "authors": [ 317 | { 318 | "name": "PHP-FIG", 319 | "homepage": "http://www.php-fig.org/" 320 | } 321 | ], 322 | "description": "Common interface for logging libraries", 323 | "homepage": "https://github.com/php-fig/log", 324 | "keywords": [ 325 | "log", 326 | "psr", 327 | "psr-3" 328 | ], 329 | "time": "2016-10-10 12:19:37" 330 | }, 331 | { 332 | "name": "symfony/cache", 333 | "version": "v3.2.8", 334 | "source": { 335 | "type": "git", 336 | "url": "https://github.com/symfony/cache.git", 337 | "reference": "ce81ce67baa387c556d03f389fb3c9efc11286aa" 338 | }, 339 | "dist": { 340 | "type": "zip", 341 | "url": "https://api.github.com/repos/symfony/cache/zipball/ce81ce67baa387c556d03f389fb3c9efc11286aa", 342 | "reference": "ce81ce67baa387c556d03f389fb3c9efc11286aa", 343 | "shasum": "" 344 | }, 345 | "require": { 346 | "php": ">=5.5.9", 347 | "psr/cache": "~1.0", 348 | "psr/log": "~1.0" 349 | }, 350 | "provide": { 351 | "psr/cache-implementation": "1.0" 352 | }, 353 | "require-dev": { 354 | "cache/integration-tests": "dev-master", 355 | "doctrine/cache": "~1.6", 356 | "doctrine/dbal": "~2.4", 357 | "predis/predis": "~1.0" 358 | }, 359 | "suggest": { 360 | "symfony/polyfill-apcu": "For using ApcuAdapter on HHVM" 361 | }, 362 | "type": "library", 363 | "extra": { 364 | "branch-alias": { 365 | "dev-master": "3.2-dev" 366 | } 367 | }, 368 | "autoload": { 369 | "psr-4": { 370 | "Symfony\\Component\\Cache\\": "" 371 | }, 372 | "exclude-from-classmap": [ 373 | "/Tests/" 374 | ] 375 | }, 376 | "notification-url": "https://packagist.org/downloads/", 377 | "license": [ 378 | "MIT" 379 | ], 380 | "authors": [ 381 | { 382 | "name": "Nicolas Grekas", 383 | "email": "p@tchwork.com" 384 | }, 385 | { 386 | "name": "Symfony Community", 387 | "homepage": "https://symfony.com/contributors" 388 | } 389 | ], 390 | "description": "Symfony implementation of PSR-6", 391 | "homepage": "https://symfony.com", 392 | "keywords": [ 393 | "caching", 394 | "psr6" 395 | ], 396 | "time": "2017-04-12 14:14:23" 397 | } 398 | ], 399 | "packages-dev": [ 400 | { 401 | "name": "doctrine/instantiator", 402 | "version": "1.0.5", 403 | "source": { 404 | "type": "git", 405 | "url": "https://github.com/doctrine/instantiator.git", 406 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" 407 | }, 408 | "dist": { 409 | "type": "zip", 410 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", 411 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", 412 | "shasum": "" 413 | }, 414 | "require": { 415 | "php": ">=5.3,<8.0-DEV" 416 | }, 417 | "require-dev": { 418 | "athletic/athletic": "~0.1.8", 419 | "ext-pdo": "*", 420 | "ext-phar": "*", 421 | "phpunit/phpunit": "~4.0", 422 | "squizlabs/php_codesniffer": "~2.0" 423 | }, 424 | "type": "library", 425 | "extra": { 426 | "branch-alias": { 427 | "dev-master": "1.0.x-dev" 428 | } 429 | }, 430 | "autoload": { 431 | "psr-4": { 432 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 433 | } 434 | }, 435 | "notification-url": "https://packagist.org/downloads/", 436 | "license": [ 437 | "MIT" 438 | ], 439 | "authors": [ 440 | { 441 | "name": "Marco Pivetta", 442 | "email": "ocramius@gmail.com", 443 | "homepage": "http://ocramius.github.com/" 444 | } 445 | ], 446 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 447 | "homepage": "https://github.com/doctrine/instantiator", 448 | "keywords": [ 449 | "constructor", 450 | "instantiate" 451 | ], 452 | "time": "2015-06-14 21:17:01" 453 | }, 454 | { 455 | "name": "myclabs/deep-copy", 456 | "version": "1.6.1", 457 | "source": { 458 | "type": "git", 459 | "url": "https://github.com/myclabs/DeepCopy.git", 460 | "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" 461 | }, 462 | "dist": { 463 | "type": "zip", 464 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", 465 | "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", 466 | "shasum": "" 467 | }, 468 | "require": { 469 | "php": ">=5.4.0" 470 | }, 471 | "require-dev": { 472 | "doctrine/collections": "1.*", 473 | "phpunit/phpunit": "~4.1" 474 | }, 475 | "type": "library", 476 | "autoload": { 477 | "psr-4": { 478 | "DeepCopy\\": "src/DeepCopy/" 479 | } 480 | }, 481 | "notification-url": "https://packagist.org/downloads/", 482 | "license": [ 483 | "MIT" 484 | ], 485 | "description": "Create deep copies (clones) of your objects", 486 | "homepage": "https://github.com/myclabs/DeepCopy", 487 | "keywords": [ 488 | "clone", 489 | "copy", 490 | "duplicate", 491 | "object", 492 | "object graph" 493 | ], 494 | "time": "2017-04-12 18:52:22" 495 | }, 496 | { 497 | "name": "phpdocumentor/reflection-common", 498 | "version": "1.0", 499 | "source": { 500 | "type": "git", 501 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 502 | "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" 503 | }, 504 | "dist": { 505 | "type": "zip", 506 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", 507 | "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", 508 | "shasum": "" 509 | }, 510 | "require": { 511 | "php": ">=5.5" 512 | }, 513 | "require-dev": { 514 | "phpunit/phpunit": "^4.6" 515 | }, 516 | "type": "library", 517 | "extra": { 518 | "branch-alias": { 519 | "dev-master": "1.0.x-dev" 520 | } 521 | }, 522 | "autoload": { 523 | "psr-4": { 524 | "phpDocumentor\\Reflection\\": [ 525 | "src" 526 | ] 527 | } 528 | }, 529 | "notification-url": "https://packagist.org/downloads/", 530 | "license": [ 531 | "MIT" 532 | ], 533 | "authors": [ 534 | { 535 | "name": "Jaap van Otterdijk", 536 | "email": "opensource@ijaap.nl" 537 | } 538 | ], 539 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 540 | "homepage": "http://www.phpdoc.org", 541 | "keywords": [ 542 | "FQSEN", 543 | "phpDocumentor", 544 | "phpdoc", 545 | "reflection", 546 | "static analysis" 547 | ], 548 | "time": "2015-12-27 11:43:31" 549 | }, 550 | { 551 | "name": "phpdocumentor/reflection-docblock", 552 | "version": "3.1.1", 553 | "source": { 554 | "type": "git", 555 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 556 | "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" 557 | }, 558 | "dist": { 559 | "type": "zip", 560 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", 561 | "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", 562 | "shasum": "" 563 | }, 564 | "require": { 565 | "php": ">=5.5", 566 | "phpdocumentor/reflection-common": "^1.0@dev", 567 | "phpdocumentor/type-resolver": "^0.2.0", 568 | "webmozart/assert": "^1.0" 569 | }, 570 | "require-dev": { 571 | "mockery/mockery": "^0.9.4", 572 | "phpunit/phpunit": "^4.4" 573 | }, 574 | "type": "library", 575 | "autoload": { 576 | "psr-4": { 577 | "phpDocumentor\\Reflection\\": [ 578 | "src/" 579 | ] 580 | } 581 | }, 582 | "notification-url": "https://packagist.org/downloads/", 583 | "license": [ 584 | "MIT" 585 | ], 586 | "authors": [ 587 | { 588 | "name": "Mike van Riel", 589 | "email": "me@mikevanriel.com" 590 | } 591 | ], 592 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 593 | "time": "2016-09-30 07:12:33" 594 | }, 595 | { 596 | "name": "phpdocumentor/type-resolver", 597 | "version": "0.2.1", 598 | "source": { 599 | "type": "git", 600 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 601 | "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" 602 | }, 603 | "dist": { 604 | "type": "zip", 605 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", 606 | "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", 607 | "shasum": "" 608 | }, 609 | "require": { 610 | "php": ">=5.5", 611 | "phpdocumentor/reflection-common": "^1.0" 612 | }, 613 | "require-dev": { 614 | "mockery/mockery": "^0.9.4", 615 | "phpunit/phpunit": "^5.2||^4.8.24" 616 | }, 617 | "type": "library", 618 | "extra": { 619 | "branch-alias": { 620 | "dev-master": "1.0.x-dev" 621 | } 622 | }, 623 | "autoload": { 624 | "psr-4": { 625 | "phpDocumentor\\Reflection\\": [ 626 | "src/" 627 | ] 628 | } 629 | }, 630 | "notification-url": "https://packagist.org/downloads/", 631 | "license": [ 632 | "MIT" 633 | ], 634 | "authors": [ 635 | { 636 | "name": "Mike van Riel", 637 | "email": "me@mikevanriel.com" 638 | } 639 | ], 640 | "time": "2016-11-25 06:54:22" 641 | }, 642 | { 643 | "name": "phpspec/prophecy", 644 | "version": "v1.7.0", 645 | "source": { 646 | "type": "git", 647 | "url": "https://github.com/phpspec/prophecy.git", 648 | "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" 649 | }, 650 | "dist": { 651 | "type": "zip", 652 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", 653 | "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", 654 | "shasum": "" 655 | }, 656 | "require": { 657 | "doctrine/instantiator": "^1.0.2", 658 | "php": "^5.3|^7.0", 659 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", 660 | "sebastian/comparator": "^1.1|^2.0", 661 | "sebastian/recursion-context": "^1.0|^2.0|^3.0" 662 | }, 663 | "require-dev": { 664 | "phpspec/phpspec": "^2.5|^3.2", 665 | "phpunit/phpunit": "^4.8 || ^5.6.5" 666 | }, 667 | "type": "library", 668 | "extra": { 669 | "branch-alias": { 670 | "dev-master": "1.6.x-dev" 671 | } 672 | }, 673 | "autoload": { 674 | "psr-0": { 675 | "Prophecy\\": "src/" 676 | } 677 | }, 678 | "notification-url": "https://packagist.org/downloads/", 679 | "license": [ 680 | "MIT" 681 | ], 682 | "authors": [ 683 | { 684 | "name": "Konstantin Kudryashov", 685 | "email": "ever.zet@gmail.com", 686 | "homepage": "http://everzet.com" 687 | }, 688 | { 689 | "name": "Marcello Duarte", 690 | "email": "marcello.duarte@gmail.com" 691 | } 692 | ], 693 | "description": "Highly opinionated mocking framework for PHP 5.3+", 694 | "homepage": "https://github.com/phpspec/prophecy", 695 | "keywords": [ 696 | "Double", 697 | "Dummy", 698 | "fake", 699 | "mock", 700 | "spy", 701 | "stub" 702 | ], 703 | "time": "2017-03-02 20:05:34" 704 | }, 705 | { 706 | "name": "phpunit/php-code-coverage", 707 | "version": "4.0.8", 708 | "source": { 709 | "type": "git", 710 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 711 | "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" 712 | }, 713 | "dist": { 714 | "type": "zip", 715 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", 716 | "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", 717 | "shasum": "" 718 | }, 719 | "require": { 720 | "ext-dom": "*", 721 | "ext-xmlwriter": "*", 722 | "php": "^5.6 || ^7.0", 723 | "phpunit/php-file-iterator": "^1.3", 724 | "phpunit/php-text-template": "^1.2", 725 | "phpunit/php-token-stream": "^1.4.2 || ^2.0", 726 | "sebastian/code-unit-reverse-lookup": "^1.0", 727 | "sebastian/environment": "^1.3.2 || ^2.0", 728 | "sebastian/version": "^1.0 || ^2.0" 729 | }, 730 | "require-dev": { 731 | "ext-xdebug": "^2.1.4", 732 | "phpunit/phpunit": "^5.7" 733 | }, 734 | "suggest": { 735 | "ext-xdebug": "^2.5.1" 736 | }, 737 | "type": "library", 738 | "extra": { 739 | "branch-alias": { 740 | "dev-master": "4.0.x-dev" 741 | } 742 | }, 743 | "autoload": { 744 | "classmap": [ 745 | "src/" 746 | ] 747 | }, 748 | "notification-url": "https://packagist.org/downloads/", 749 | "license": [ 750 | "BSD-3-Clause" 751 | ], 752 | "authors": [ 753 | { 754 | "name": "Sebastian Bergmann", 755 | "email": "sb@sebastian-bergmann.de", 756 | "role": "lead" 757 | } 758 | ], 759 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 760 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 761 | "keywords": [ 762 | "coverage", 763 | "testing", 764 | "xunit" 765 | ], 766 | "time": "2017-04-02 07:44:40" 767 | }, 768 | { 769 | "name": "phpunit/php-file-iterator", 770 | "version": "1.4.2", 771 | "source": { 772 | "type": "git", 773 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 774 | "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" 775 | }, 776 | "dist": { 777 | "type": "zip", 778 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", 779 | "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", 780 | "shasum": "" 781 | }, 782 | "require": { 783 | "php": ">=5.3.3" 784 | }, 785 | "type": "library", 786 | "extra": { 787 | "branch-alias": { 788 | "dev-master": "1.4.x-dev" 789 | } 790 | }, 791 | "autoload": { 792 | "classmap": [ 793 | "src/" 794 | ] 795 | }, 796 | "notification-url": "https://packagist.org/downloads/", 797 | "license": [ 798 | "BSD-3-Clause" 799 | ], 800 | "authors": [ 801 | { 802 | "name": "Sebastian Bergmann", 803 | "email": "sb@sebastian-bergmann.de", 804 | "role": "lead" 805 | } 806 | ], 807 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 808 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 809 | "keywords": [ 810 | "filesystem", 811 | "iterator" 812 | ], 813 | "time": "2016-10-03 07:40:28" 814 | }, 815 | { 816 | "name": "phpunit/php-text-template", 817 | "version": "1.2.1", 818 | "source": { 819 | "type": "git", 820 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 821 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 822 | }, 823 | "dist": { 824 | "type": "zip", 825 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 826 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 827 | "shasum": "" 828 | }, 829 | "require": { 830 | "php": ">=5.3.3" 831 | }, 832 | "type": "library", 833 | "autoload": { 834 | "classmap": [ 835 | "src/" 836 | ] 837 | }, 838 | "notification-url": "https://packagist.org/downloads/", 839 | "license": [ 840 | "BSD-3-Clause" 841 | ], 842 | "authors": [ 843 | { 844 | "name": "Sebastian Bergmann", 845 | "email": "sebastian@phpunit.de", 846 | "role": "lead" 847 | } 848 | ], 849 | "description": "Simple template engine.", 850 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 851 | "keywords": [ 852 | "template" 853 | ], 854 | "time": "2015-06-21 13:50:34" 855 | }, 856 | { 857 | "name": "phpunit/php-timer", 858 | "version": "1.0.9", 859 | "source": { 860 | "type": "git", 861 | "url": "https://github.com/sebastianbergmann/php-timer.git", 862 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" 863 | }, 864 | "dist": { 865 | "type": "zip", 866 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 867 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 868 | "shasum": "" 869 | }, 870 | "require": { 871 | "php": "^5.3.3 || ^7.0" 872 | }, 873 | "require-dev": { 874 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" 875 | }, 876 | "type": "library", 877 | "extra": { 878 | "branch-alias": { 879 | "dev-master": "1.0-dev" 880 | } 881 | }, 882 | "autoload": { 883 | "classmap": [ 884 | "src/" 885 | ] 886 | }, 887 | "notification-url": "https://packagist.org/downloads/", 888 | "license": [ 889 | "BSD-3-Clause" 890 | ], 891 | "authors": [ 892 | { 893 | "name": "Sebastian Bergmann", 894 | "email": "sb@sebastian-bergmann.de", 895 | "role": "lead" 896 | } 897 | ], 898 | "description": "Utility class for timing", 899 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 900 | "keywords": [ 901 | "timer" 902 | ], 903 | "time": "2017-02-26 11:10:40" 904 | }, 905 | { 906 | "name": "phpunit/php-token-stream", 907 | "version": "1.4.11", 908 | "source": { 909 | "type": "git", 910 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 911 | "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" 912 | }, 913 | "dist": { 914 | "type": "zip", 915 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", 916 | "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", 917 | "shasum": "" 918 | }, 919 | "require": { 920 | "ext-tokenizer": "*", 921 | "php": ">=5.3.3" 922 | }, 923 | "require-dev": { 924 | "phpunit/phpunit": "~4.2" 925 | }, 926 | "type": "library", 927 | "extra": { 928 | "branch-alias": { 929 | "dev-master": "1.4-dev" 930 | } 931 | }, 932 | "autoload": { 933 | "classmap": [ 934 | "src/" 935 | ] 936 | }, 937 | "notification-url": "https://packagist.org/downloads/", 938 | "license": [ 939 | "BSD-3-Clause" 940 | ], 941 | "authors": [ 942 | { 943 | "name": "Sebastian Bergmann", 944 | "email": "sebastian@phpunit.de" 945 | } 946 | ], 947 | "description": "Wrapper around PHP's tokenizer extension.", 948 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 949 | "keywords": [ 950 | "tokenizer" 951 | ], 952 | "time": "2017-02-27 10:12:30" 953 | }, 954 | { 955 | "name": "phpunit/phpunit", 956 | "version": "5.7.20", 957 | "source": { 958 | "type": "git", 959 | "url": "https://github.com/sebastianbergmann/phpunit.git", 960 | "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b" 961 | }, 962 | "dist": { 963 | "type": "zip", 964 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cb94a5f8c07a03c8b7527ed7468a2926203f58b", 965 | "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b", 966 | "shasum": "" 967 | }, 968 | "require": { 969 | "ext-dom": "*", 970 | "ext-json": "*", 971 | "ext-libxml": "*", 972 | "ext-mbstring": "*", 973 | "ext-xml": "*", 974 | "myclabs/deep-copy": "~1.3", 975 | "php": "^5.6 || ^7.0", 976 | "phpspec/prophecy": "^1.6.2", 977 | "phpunit/php-code-coverage": "^4.0.4", 978 | "phpunit/php-file-iterator": "~1.4", 979 | "phpunit/php-text-template": "~1.2", 980 | "phpunit/php-timer": "^1.0.6", 981 | "phpunit/phpunit-mock-objects": "^3.2", 982 | "sebastian/comparator": "^1.2.4", 983 | "sebastian/diff": "^1.4.3", 984 | "sebastian/environment": "^1.3.4 || ^2.0", 985 | "sebastian/exporter": "~2.0", 986 | "sebastian/global-state": "^1.1", 987 | "sebastian/object-enumerator": "~2.0", 988 | "sebastian/resource-operations": "~1.0", 989 | "sebastian/version": "~1.0.3|~2.0", 990 | "symfony/yaml": "~2.1|~3.0" 991 | }, 992 | "conflict": { 993 | "phpdocumentor/reflection-docblock": "3.0.2" 994 | }, 995 | "require-dev": { 996 | "ext-pdo": "*" 997 | }, 998 | "suggest": { 999 | "ext-xdebug": "*", 1000 | "phpunit/php-invoker": "~1.1" 1001 | }, 1002 | "bin": [ 1003 | "phpunit" 1004 | ], 1005 | "type": "library", 1006 | "extra": { 1007 | "branch-alias": { 1008 | "dev-master": "5.7.x-dev" 1009 | } 1010 | }, 1011 | "autoload": { 1012 | "classmap": [ 1013 | "src/" 1014 | ] 1015 | }, 1016 | "notification-url": "https://packagist.org/downloads/", 1017 | "license": [ 1018 | "BSD-3-Clause" 1019 | ], 1020 | "authors": [ 1021 | { 1022 | "name": "Sebastian Bergmann", 1023 | "email": "sebastian@phpunit.de", 1024 | "role": "lead" 1025 | } 1026 | ], 1027 | "description": "The PHP Unit Testing framework.", 1028 | "homepage": "https://phpunit.de/", 1029 | "keywords": [ 1030 | "phpunit", 1031 | "testing", 1032 | "xunit" 1033 | ], 1034 | "time": "2017-05-22 07:42:55" 1035 | }, 1036 | { 1037 | "name": "phpunit/phpunit-mock-objects", 1038 | "version": "3.4.3", 1039 | "source": { 1040 | "type": "git", 1041 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", 1042 | "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" 1043 | }, 1044 | "dist": { 1045 | "type": "zip", 1046 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", 1047 | "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", 1048 | "shasum": "" 1049 | }, 1050 | "require": { 1051 | "doctrine/instantiator": "^1.0.2", 1052 | "php": "^5.6 || ^7.0", 1053 | "phpunit/php-text-template": "^1.2", 1054 | "sebastian/exporter": "^1.2 || ^2.0" 1055 | }, 1056 | "conflict": { 1057 | "phpunit/phpunit": "<5.4.0" 1058 | }, 1059 | "require-dev": { 1060 | "phpunit/phpunit": "^5.4" 1061 | }, 1062 | "suggest": { 1063 | "ext-soap": "*" 1064 | }, 1065 | "type": "library", 1066 | "extra": { 1067 | "branch-alias": { 1068 | "dev-master": "3.2.x-dev" 1069 | } 1070 | }, 1071 | "autoload": { 1072 | "classmap": [ 1073 | "src/" 1074 | ] 1075 | }, 1076 | "notification-url": "https://packagist.org/downloads/", 1077 | "license": [ 1078 | "BSD-3-Clause" 1079 | ], 1080 | "authors": [ 1081 | { 1082 | "name": "Sebastian Bergmann", 1083 | "email": "sb@sebastian-bergmann.de", 1084 | "role": "lead" 1085 | } 1086 | ], 1087 | "description": "Mock Object library for PHPUnit", 1088 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", 1089 | "keywords": [ 1090 | "mock", 1091 | "xunit" 1092 | ], 1093 | "time": "2016-12-08 20:27:08" 1094 | }, 1095 | { 1096 | "name": "predis/predis", 1097 | "version": "v1.1.1", 1098 | "source": { 1099 | "type": "git", 1100 | "url": "https://github.com/nrk/predis.git", 1101 | "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1" 1102 | }, 1103 | "dist": { 1104 | "type": "zip", 1105 | "url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1", 1106 | "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1", 1107 | "shasum": "" 1108 | }, 1109 | "require": { 1110 | "php": ">=5.3.9" 1111 | }, 1112 | "require-dev": { 1113 | "phpunit/phpunit": "~4.8" 1114 | }, 1115 | "suggest": { 1116 | "ext-curl": "Allows access to Webdis when paired with phpiredis", 1117 | "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" 1118 | }, 1119 | "type": "library", 1120 | "autoload": { 1121 | "psr-4": { 1122 | "Predis\\": "src/" 1123 | } 1124 | }, 1125 | "notification-url": "https://packagist.org/downloads/", 1126 | "license": [ 1127 | "MIT" 1128 | ], 1129 | "authors": [ 1130 | { 1131 | "name": "Daniele Alessandri", 1132 | "email": "suppakilla@gmail.com", 1133 | "homepage": "http://clorophilla.net" 1134 | } 1135 | ], 1136 | "description": "Flexible and feature-complete Redis client for PHP and HHVM", 1137 | "homepage": "http://github.com/nrk/predis", 1138 | "keywords": [ 1139 | "nosql", 1140 | "predis", 1141 | "redis" 1142 | ], 1143 | "time": "2016-06-16 16:22:20" 1144 | }, 1145 | { 1146 | "name": "sebastian/code-unit-reverse-lookup", 1147 | "version": "1.0.1", 1148 | "source": { 1149 | "type": "git", 1150 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1151 | "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" 1152 | }, 1153 | "dist": { 1154 | "type": "zip", 1155 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", 1156 | "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", 1157 | "shasum": "" 1158 | }, 1159 | "require": { 1160 | "php": "^5.6 || ^7.0" 1161 | }, 1162 | "require-dev": { 1163 | "phpunit/phpunit": "^5.7 || ^6.0" 1164 | }, 1165 | "type": "library", 1166 | "extra": { 1167 | "branch-alias": { 1168 | "dev-master": "1.0.x-dev" 1169 | } 1170 | }, 1171 | "autoload": { 1172 | "classmap": [ 1173 | "src/" 1174 | ] 1175 | }, 1176 | "notification-url": "https://packagist.org/downloads/", 1177 | "license": [ 1178 | "BSD-3-Clause" 1179 | ], 1180 | "authors": [ 1181 | { 1182 | "name": "Sebastian Bergmann", 1183 | "email": "sebastian@phpunit.de" 1184 | } 1185 | ], 1186 | "description": "Looks up which function or method a line of code belongs to", 1187 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1188 | "time": "2017-03-04 06:30:41" 1189 | }, 1190 | { 1191 | "name": "sebastian/comparator", 1192 | "version": "1.2.4", 1193 | "source": { 1194 | "type": "git", 1195 | "url": "https://github.com/sebastianbergmann/comparator.git", 1196 | "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" 1197 | }, 1198 | "dist": { 1199 | "type": "zip", 1200 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", 1201 | "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", 1202 | "shasum": "" 1203 | }, 1204 | "require": { 1205 | "php": ">=5.3.3", 1206 | "sebastian/diff": "~1.2", 1207 | "sebastian/exporter": "~1.2 || ~2.0" 1208 | }, 1209 | "require-dev": { 1210 | "phpunit/phpunit": "~4.4" 1211 | }, 1212 | "type": "library", 1213 | "extra": { 1214 | "branch-alias": { 1215 | "dev-master": "1.2.x-dev" 1216 | } 1217 | }, 1218 | "autoload": { 1219 | "classmap": [ 1220 | "src/" 1221 | ] 1222 | }, 1223 | "notification-url": "https://packagist.org/downloads/", 1224 | "license": [ 1225 | "BSD-3-Clause" 1226 | ], 1227 | "authors": [ 1228 | { 1229 | "name": "Jeff Welch", 1230 | "email": "whatthejeff@gmail.com" 1231 | }, 1232 | { 1233 | "name": "Volker Dusch", 1234 | "email": "github@wallbash.com" 1235 | }, 1236 | { 1237 | "name": "Bernhard Schussek", 1238 | "email": "bschussek@2bepublished.at" 1239 | }, 1240 | { 1241 | "name": "Sebastian Bergmann", 1242 | "email": "sebastian@phpunit.de" 1243 | } 1244 | ], 1245 | "description": "Provides the functionality to compare PHP values for equality", 1246 | "homepage": "http://www.github.com/sebastianbergmann/comparator", 1247 | "keywords": [ 1248 | "comparator", 1249 | "compare", 1250 | "equality" 1251 | ], 1252 | "time": "2017-01-29 09:50:25" 1253 | }, 1254 | { 1255 | "name": "sebastian/diff", 1256 | "version": "1.4.3", 1257 | "source": { 1258 | "type": "git", 1259 | "url": "https://github.com/sebastianbergmann/diff.git", 1260 | "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" 1261 | }, 1262 | "dist": { 1263 | "type": "zip", 1264 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", 1265 | "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", 1266 | "shasum": "" 1267 | }, 1268 | "require": { 1269 | "php": "^5.3.3 || ^7.0" 1270 | }, 1271 | "require-dev": { 1272 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" 1273 | }, 1274 | "type": "library", 1275 | "extra": { 1276 | "branch-alias": { 1277 | "dev-master": "1.4-dev" 1278 | } 1279 | }, 1280 | "autoload": { 1281 | "classmap": [ 1282 | "src/" 1283 | ] 1284 | }, 1285 | "notification-url": "https://packagist.org/downloads/", 1286 | "license": [ 1287 | "BSD-3-Clause" 1288 | ], 1289 | "authors": [ 1290 | { 1291 | "name": "Kore Nordmann", 1292 | "email": "mail@kore-nordmann.de" 1293 | }, 1294 | { 1295 | "name": "Sebastian Bergmann", 1296 | "email": "sebastian@phpunit.de" 1297 | } 1298 | ], 1299 | "description": "Diff implementation", 1300 | "homepage": "https://github.com/sebastianbergmann/diff", 1301 | "keywords": [ 1302 | "diff" 1303 | ], 1304 | "time": "2017-05-22 07:24:03" 1305 | }, 1306 | { 1307 | "name": "sebastian/environment", 1308 | "version": "2.0.0", 1309 | "source": { 1310 | "type": "git", 1311 | "url": "https://github.com/sebastianbergmann/environment.git", 1312 | "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" 1313 | }, 1314 | "dist": { 1315 | "type": "zip", 1316 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", 1317 | "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", 1318 | "shasum": "" 1319 | }, 1320 | "require": { 1321 | "php": "^5.6 || ^7.0" 1322 | }, 1323 | "require-dev": { 1324 | "phpunit/phpunit": "^5.0" 1325 | }, 1326 | "type": "library", 1327 | "extra": { 1328 | "branch-alias": { 1329 | "dev-master": "2.0.x-dev" 1330 | } 1331 | }, 1332 | "autoload": { 1333 | "classmap": [ 1334 | "src/" 1335 | ] 1336 | }, 1337 | "notification-url": "https://packagist.org/downloads/", 1338 | "license": [ 1339 | "BSD-3-Clause" 1340 | ], 1341 | "authors": [ 1342 | { 1343 | "name": "Sebastian Bergmann", 1344 | "email": "sebastian@phpunit.de" 1345 | } 1346 | ], 1347 | "description": "Provides functionality to handle HHVM/PHP environments", 1348 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1349 | "keywords": [ 1350 | "Xdebug", 1351 | "environment", 1352 | "hhvm" 1353 | ], 1354 | "time": "2016-11-26 07:53:53" 1355 | }, 1356 | { 1357 | "name": "sebastian/exporter", 1358 | "version": "2.0.0", 1359 | "source": { 1360 | "type": "git", 1361 | "url": "https://github.com/sebastianbergmann/exporter.git", 1362 | "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" 1363 | }, 1364 | "dist": { 1365 | "type": "zip", 1366 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", 1367 | "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", 1368 | "shasum": "" 1369 | }, 1370 | "require": { 1371 | "php": ">=5.3.3", 1372 | "sebastian/recursion-context": "~2.0" 1373 | }, 1374 | "require-dev": { 1375 | "ext-mbstring": "*", 1376 | "phpunit/phpunit": "~4.4" 1377 | }, 1378 | "type": "library", 1379 | "extra": { 1380 | "branch-alias": { 1381 | "dev-master": "2.0.x-dev" 1382 | } 1383 | }, 1384 | "autoload": { 1385 | "classmap": [ 1386 | "src/" 1387 | ] 1388 | }, 1389 | "notification-url": "https://packagist.org/downloads/", 1390 | "license": [ 1391 | "BSD-3-Clause" 1392 | ], 1393 | "authors": [ 1394 | { 1395 | "name": "Jeff Welch", 1396 | "email": "whatthejeff@gmail.com" 1397 | }, 1398 | { 1399 | "name": "Volker Dusch", 1400 | "email": "github@wallbash.com" 1401 | }, 1402 | { 1403 | "name": "Bernhard Schussek", 1404 | "email": "bschussek@2bepublished.at" 1405 | }, 1406 | { 1407 | "name": "Sebastian Bergmann", 1408 | "email": "sebastian@phpunit.de" 1409 | }, 1410 | { 1411 | "name": "Adam Harvey", 1412 | "email": "aharvey@php.net" 1413 | } 1414 | ], 1415 | "description": "Provides the functionality to export PHP variables for visualization", 1416 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1417 | "keywords": [ 1418 | "export", 1419 | "exporter" 1420 | ], 1421 | "time": "2016-11-19 08:54:04" 1422 | }, 1423 | { 1424 | "name": "sebastian/global-state", 1425 | "version": "1.1.1", 1426 | "source": { 1427 | "type": "git", 1428 | "url": "https://github.com/sebastianbergmann/global-state.git", 1429 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" 1430 | }, 1431 | "dist": { 1432 | "type": "zip", 1433 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", 1434 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", 1435 | "shasum": "" 1436 | }, 1437 | "require": { 1438 | "php": ">=5.3.3" 1439 | }, 1440 | "require-dev": { 1441 | "phpunit/phpunit": "~4.2" 1442 | }, 1443 | "suggest": { 1444 | "ext-uopz": "*" 1445 | }, 1446 | "type": "library", 1447 | "extra": { 1448 | "branch-alias": { 1449 | "dev-master": "1.0-dev" 1450 | } 1451 | }, 1452 | "autoload": { 1453 | "classmap": [ 1454 | "src/" 1455 | ] 1456 | }, 1457 | "notification-url": "https://packagist.org/downloads/", 1458 | "license": [ 1459 | "BSD-3-Clause" 1460 | ], 1461 | "authors": [ 1462 | { 1463 | "name": "Sebastian Bergmann", 1464 | "email": "sebastian@phpunit.de" 1465 | } 1466 | ], 1467 | "description": "Snapshotting of global state", 1468 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1469 | "keywords": [ 1470 | "global state" 1471 | ], 1472 | "time": "2015-10-12 03:26:01" 1473 | }, 1474 | { 1475 | "name": "sebastian/object-enumerator", 1476 | "version": "2.0.1", 1477 | "source": { 1478 | "type": "git", 1479 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 1480 | "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" 1481 | }, 1482 | "dist": { 1483 | "type": "zip", 1484 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", 1485 | "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", 1486 | "shasum": "" 1487 | }, 1488 | "require": { 1489 | "php": ">=5.6", 1490 | "sebastian/recursion-context": "~2.0" 1491 | }, 1492 | "require-dev": { 1493 | "phpunit/phpunit": "~5" 1494 | }, 1495 | "type": "library", 1496 | "extra": { 1497 | "branch-alias": { 1498 | "dev-master": "2.0.x-dev" 1499 | } 1500 | }, 1501 | "autoload": { 1502 | "classmap": [ 1503 | "src/" 1504 | ] 1505 | }, 1506 | "notification-url": "https://packagist.org/downloads/", 1507 | "license": [ 1508 | "BSD-3-Clause" 1509 | ], 1510 | "authors": [ 1511 | { 1512 | "name": "Sebastian Bergmann", 1513 | "email": "sebastian@phpunit.de" 1514 | } 1515 | ], 1516 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 1517 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 1518 | "time": "2017-02-18 15:18:39" 1519 | }, 1520 | { 1521 | "name": "sebastian/recursion-context", 1522 | "version": "2.0.0", 1523 | "source": { 1524 | "type": "git", 1525 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1526 | "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" 1527 | }, 1528 | "dist": { 1529 | "type": "zip", 1530 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", 1531 | "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", 1532 | "shasum": "" 1533 | }, 1534 | "require": { 1535 | "php": ">=5.3.3" 1536 | }, 1537 | "require-dev": { 1538 | "phpunit/phpunit": "~4.4" 1539 | }, 1540 | "type": "library", 1541 | "extra": { 1542 | "branch-alias": { 1543 | "dev-master": "2.0.x-dev" 1544 | } 1545 | }, 1546 | "autoload": { 1547 | "classmap": [ 1548 | "src/" 1549 | ] 1550 | }, 1551 | "notification-url": "https://packagist.org/downloads/", 1552 | "license": [ 1553 | "BSD-3-Clause" 1554 | ], 1555 | "authors": [ 1556 | { 1557 | "name": "Jeff Welch", 1558 | "email": "whatthejeff@gmail.com" 1559 | }, 1560 | { 1561 | "name": "Sebastian Bergmann", 1562 | "email": "sebastian@phpunit.de" 1563 | }, 1564 | { 1565 | "name": "Adam Harvey", 1566 | "email": "aharvey@php.net" 1567 | } 1568 | ], 1569 | "description": "Provides functionality to recursively process PHP variables", 1570 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1571 | "time": "2016-11-19 07:33:16" 1572 | }, 1573 | { 1574 | "name": "sebastian/resource-operations", 1575 | "version": "1.0.0", 1576 | "source": { 1577 | "type": "git", 1578 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 1579 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" 1580 | }, 1581 | "dist": { 1582 | "type": "zip", 1583 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", 1584 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", 1585 | "shasum": "" 1586 | }, 1587 | "require": { 1588 | "php": ">=5.6.0" 1589 | }, 1590 | "type": "library", 1591 | "extra": { 1592 | "branch-alias": { 1593 | "dev-master": "1.0.x-dev" 1594 | } 1595 | }, 1596 | "autoload": { 1597 | "classmap": [ 1598 | "src/" 1599 | ] 1600 | }, 1601 | "notification-url": "https://packagist.org/downloads/", 1602 | "license": [ 1603 | "BSD-3-Clause" 1604 | ], 1605 | "authors": [ 1606 | { 1607 | "name": "Sebastian Bergmann", 1608 | "email": "sebastian@phpunit.de" 1609 | } 1610 | ], 1611 | "description": "Provides a list of PHP built-in functions that operate on resources", 1612 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 1613 | "time": "2015-07-28 20:34:47" 1614 | }, 1615 | { 1616 | "name": "sebastian/version", 1617 | "version": "2.0.1", 1618 | "source": { 1619 | "type": "git", 1620 | "url": "https://github.com/sebastianbergmann/version.git", 1621 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" 1622 | }, 1623 | "dist": { 1624 | "type": "zip", 1625 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", 1626 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", 1627 | "shasum": "" 1628 | }, 1629 | "require": { 1630 | "php": ">=5.6" 1631 | }, 1632 | "type": "library", 1633 | "extra": { 1634 | "branch-alias": { 1635 | "dev-master": "2.0.x-dev" 1636 | } 1637 | }, 1638 | "autoload": { 1639 | "classmap": [ 1640 | "src/" 1641 | ] 1642 | }, 1643 | "notification-url": "https://packagist.org/downloads/", 1644 | "license": [ 1645 | "BSD-3-Clause" 1646 | ], 1647 | "authors": [ 1648 | { 1649 | "name": "Sebastian Bergmann", 1650 | "email": "sebastian@phpunit.de", 1651 | "role": "lead" 1652 | } 1653 | ], 1654 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 1655 | "homepage": "https://github.com/sebastianbergmann/version", 1656 | "time": "2016-10-03 07:35:21" 1657 | }, 1658 | { 1659 | "name": "symfony/yaml", 1660 | "version": "v3.2.8", 1661 | "source": { 1662 | "type": "git", 1663 | "url": "https://github.com/symfony/yaml.git", 1664 | "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6" 1665 | }, 1666 | "dist": { 1667 | "type": "zip", 1668 | "url": "https://api.github.com/repos/symfony/yaml/zipball/acec26fcf7f3031e094e910b94b002fa53d4e4d6", 1669 | "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6", 1670 | "shasum": "" 1671 | }, 1672 | "require": { 1673 | "php": ">=5.5.9" 1674 | }, 1675 | "require-dev": { 1676 | "symfony/console": "~2.8|~3.0" 1677 | }, 1678 | "suggest": { 1679 | "symfony/console": "For validating YAML files using the lint command" 1680 | }, 1681 | "type": "library", 1682 | "extra": { 1683 | "branch-alias": { 1684 | "dev-master": "3.2-dev" 1685 | } 1686 | }, 1687 | "autoload": { 1688 | "psr-4": { 1689 | "Symfony\\Component\\Yaml\\": "" 1690 | }, 1691 | "exclude-from-classmap": [ 1692 | "/Tests/" 1693 | ] 1694 | }, 1695 | "notification-url": "https://packagist.org/downloads/", 1696 | "license": [ 1697 | "MIT" 1698 | ], 1699 | "authors": [ 1700 | { 1701 | "name": "Fabien Potencier", 1702 | "email": "fabien@symfony.com" 1703 | }, 1704 | { 1705 | "name": "Symfony Community", 1706 | "homepage": "https://symfony.com/contributors" 1707 | } 1708 | ], 1709 | "description": "Symfony Yaml Component", 1710 | "homepage": "https://symfony.com", 1711 | "time": "2017-05-01 14:55:58" 1712 | }, 1713 | { 1714 | "name": "webmozart/assert", 1715 | "version": "1.2.0", 1716 | "source": { 1717 | "type": "git", 1718 | "url": "https://github.com/webmozart/assert.git", 1719 | "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" 1720 | }, 1721 | "dist": { 1722 | "type": "zip", 1723 | "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", 1724 | "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", 1725 | "shasum": "" 1726 | }, 1727 | "require": { 1728 | "php": "^5.3.3 || ^7.0" 1729 | }, 1730 | "require-dev": { 1731 | "phpunit/phpunit": "^4.6", 1732 | "sebastian/version": "^1.0.1" 1733 | }, 1734 | "type": "library", 1735 | "extra": { 1736 | "branch-alias": { 1737 | "dev-master": "1.3-dev" 1738 | } 1739 | }, 1740 | "autoload": { 1741 | "psr-4": { 1742 | "Webmozart\\Assert\\": "src/" 1743 | } 1744 | }, 1745 | "notification-url": "https://packagist.org/downloads/", 1746 | "license": [ 1747 | "MIT" 1748 | ], 1749 | "authors": [ 1750 | { 1751 | "name": "Bernhard Schussek", 1752 | "email": "bschussek@gmail.com" 1753 | } 1754 | ], 1755 | "description": "Assertions to validate method input/output with nice error messages.", 1756 | "keywords": [ 1757 | "assert", 1758 | "check", 1759 | "validate" 1760 | ], 1761 | "time": "2016-11-23 20:04:58" 1762 | } 1763 | ], 1764 | "aliases": [], 1765 | "minimum-stability": "stable", 1766 | "stability-flags": [], 1767 | "prefer-stable": false, 1768 | "prefer-lowest": false, 1769 | "platform": [], 1770 | "platform-dev": [] 1771 | } 1772 | --------------------------------------------------------------------------------