Completed
Pull Request — master (#11)
by Tristan
19:07
created

RuneApi::getRunesBySummonerId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace LoLApi\Api;
4
5
use LoLApi\Result\ApiResult;
6
7
/**
8
 * Class RuneApi
9
 *
10
 * @package LoLApi\Api
11
 * @see     https://developer.riotgames.com/api-methods/
12
 */
13 View Code Duplication
class RuneApi 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_RUNES_BY_SUMMONER_ID = '/lol/platform/v3/runes/by-summoner/{summonerId}';
16
17
    /**
18
     * @param string $summonerId
19
     *
20
     * @return ApiResult
21
     */
22
    public function getRunesBySummonerId($summonerId)
23
    {
24
        $url = str_replace('{summonerId}', $summonerId, self::API_URL_RUNES_BY_SUMMONER_ID);
25
26
        return $this->callApiUrl($url, [], true);
0 ignored issues
show
Unused Code introduced by
The call to RuneApi::callApiUrl() has too many arguments starting with true.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
27
    }
28
}
29