App   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stats() 0 9 1
A details() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Authy;
6
7
class App extends Client
8
{
9
    /**
10
     * Return application stats.
11
     *
12
     * @param string|null $ip
13
     *
14
     * @return \Rinvex\Authy\Response
15
     */
16
    public function stats($ip = null): Response
17
    {
18
        // Prepare required variables
19
        $url = $this->api.'app/stats';
20
        $params = $this->params + ['query' => ['user_ip' => $ip]];
21
22
        // Return Authy application stats
23
        return new Response($this->http->get($url, $params));
24
    }
25
26
    /**
27
     * Get application details.
28
     *
29
     * @param string|null $ip
30
     *
31
     * @return \Rinvex\Authy\Response
32
     */
33
    public function details($ip = null): Response
34
    {
35
        // Prepare required variables
36
        $url = $this->api.'app/details';
37
        $params = $this->params + ['query' => ['user_ip' => $ip]];
38
39
        // Return Authy application stats
40
        return new Response($this->http->get($url, $params));
41
    }
42
}
43