Completed
Push — master ( ff5b0d...faa513 )
by Tobias
05:10 queued 02:50
created

Dimension::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Happyr\ApiClient\Api;
4
5
use Happyr\ApiClient\Assert;
6
use Happyr\ApiClient\Exception;
7
use Happyr\ApiClient\Model\Dimension\Index;
8
use Psr\Http\Message\ResponseInterface;
9
10
/**
11
 * @author Tobias Nyholm <[email protected]>
12
 */
13
final class Dimension extends HttpApi
14
{
15
    /**
16
     * @param string $username
0 ignored issues
show
Bug introduced by
There is no parameter named $username. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
17
     * @param array  $params
0 ignored issues
show
Bug introduced by
There is no parameter named $params. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
18
     *
19
     * @return Index|ResponseInterface
20
     *
21
     * @throws Exception
22
     */
23
    public function index($lang)
24
    {
25
        Assert::stringNotEmpty($lang);
26
27
        $response = $this->httpGet('/api/dimensions', ['lang' => $lang]);
28
29
        return $this->hydrateResponse($response, Index::class);
30
    }
31
}
32