Auth   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getKeyInformation() 0 6 1
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