Users   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 38
c 0
b 0
f 0
wmc 3
lcom 1
cbo 1
ccs 6
cts 6
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A show() 0 4 1
A favorites() 0 4 1
A comments() 0 4 1
1
<?php
2
3
namespace Rs\VersionEye\Api;
4
5
/**
6
 * Users API.
7
 *
8
 * @author Robert Schönthal <[email protected]>
9
 *
10
 * @see https://www.versioneye.com/api/v2/swagger_doc/users
11
 */
12
class Users extends BaseApi implements Api
13
{
14
    /**
15
     * shows profile of given user_id.
16
     *
17
     * @param string $username
18
     *
19
     * @return array
20
     */
21 1
    public function show($username)
22
    {
23 1
        return $this->request('users/' . $username);
24
    }
25
26
    /**
27
     * shows user's favorite packages.
28
     *
29
     * @param string $username
30
     *
31
     * @return array
32
     */
33 1
    public function favorites($username)
34
    {
35 1
        return $this->request(sprintf('users/%s/favorites?page=%d', $username, 1));
36
    }
37
38
    /**
39
     * shows user's comments.
40
     *
41
     * @param string $username
42
     *
43
     * @return array
44
     */
45 1
    public function comments($username)
46
    {
47 1
        return $this->request(sprintf('users/%s/comments?page=%d', $username, 1));
48
    }
49
}
50