MasteryApi::getMasteriesBySummonerId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace LoLApi\Api;
4
5
use LoLApi\Result\ApiResult;
6
7
/**
8
 * Class MasteryApi
9
 *
10
 * @package LoLApi\Api
11
 * @see     https://developer.riotgames.com/api-methods/
12
 */
13 View Code Duplication
class MasteryApi extends BaseApi
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    const API_URL_MASTERIES_BY_SUMMONER_ID = '/lol/platform/v3/masteries/by-summoner/{summonerId}';
16
17
    /**
18
     * @param string $summonerId
19
     *
20
     * @return ApiResult
21
     */
22
    public function getMasteriesBySummonerId($summonerId)
23
    {
24
        $url = str_replace('{summonerId}', $summonerId, self::API_URL_MASTERIES_BY_SUMMONER_ID);
25
26
        return $this->callApiUrl($url, []);
27
    }
28
}
29