Auth::getKeyInformation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/*
3
 *   This file is part of the Vultr PHP library.
4
 *
5
 *   (c) Albert Leitato <[email protected]>
6
 *
7
 *   For the full copyright and license information, please view the LICENSE
8
 *   file that was distributed with this source code.
9
 */
10
namespace Vultr\Api;
11
12
use Vultr\Entity\Auth as AuthEntity;
13
14
/**
15
 * @author Albert Leitato <[email protected]>
16
 */
17
class Auth extends AbstractApi
18
{
19
    /**
20
     * Retrieve information about the current API key.
21
     *
22
     * @return AuthEntity
23
     */
24
    public function getKeyInformation()
25
    {
26
        $response = $this->adapter->get(\sprintf('%s/auth/info', $this->endpoint));
27
28
        return $this->handleResponse($response, AuthEntity::class);
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->handleResponse($r...tr\Entity\Auth::class); of type array|object adds the type array to the return on line 28 which is incompatible with the return type documented by Vultr\Api\Auth::getKeyInformation of type Vultr\Entity\Auth.
Loading history...
29
    }
30
}
31