Account   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 getUserInformation() 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\Account as AccountEntity;
13
14
/**
15
 * @author Albert Leitato <[email protected]>
16
 */
17
class Account extends AbstractApi
18
{
19
    /**
20
     * Retrieve information about the current account.
21
     *
22
     * @return AccountEntity
23
     */
24
    public function getUserInformation()
25
    {
26
        $account = $this->adapter->get(\sprintf('%s/account/info', $this->endpoint));
27
28
        return $this->handleResponse($account, AccountEntity::class);
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->handleResponse($a...Entity\Account::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\Account::getUserInformation of type Vultr\Entity\Account.
Loading history...
29
    }
30
}
31