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

StatusApi::getShardsByRegion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace LoLApi\Api;
4
5
use LoLApi\Result\ApiResult;
6
7
/**
8
 * Class StatusApi
9
 *
10
 * @package LoLApi\Api
11
 * @see     https://developer.riotgames.com/api-methods/
12
 */
13
class StatusApi extends BaseApi
14
{
15
    const API_URL_SHARDS = '/lol/status/v3/shard-data';
16
17
    /**
18
     * Requests to this API are not counted against the application Rate Limits.
19
     *
20
     * @return ApiResult
21 1
     */
22
    public function getShards()
23 1
    {
24
        return $this->callApiUrl(self::API_URL_SHARDS, [], true);
0 ignored issues
show
Unused Code introduced by
The call to StatusApi::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...
25
    }
26
}
27