UnsplashUsers   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 7
c 2
b 1
f 0
dl 0
loc 78
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A portfolio() 0 3 1
A profile() 0 3 1
A photos() 0 3 1
A collections() 0 3 1
A likes() 0 3 1
A statistics() 0 3 1
1
<?php
2
3
namespace shweshi\LaravelUnsplashWrapper;
4
5
class UnsplashUsers extends BaseClass
6
{
7
    /**
8
     * Retrieve profile of the user.
9
     *
10
     * @param string $username
11
     * @param array  $params
12
     *
13
     * @return mixed
14
     */
15
    public function profile($username, array $params)
16
    {
17
        return $this->call('users/'.$username, $params);
18
    }
19
20
    /**
21
     * Retrieve portfolio url of the user.
22
     *
23
     * @param string $username
24
     * @param array  $params
25
     *
26
     * @return mixed
27
     */
28
    public function portfolio($username, array $params)
29
    {
30
        return $this->call('users/'.$username.'/portfolio', $params);
31
    }
32
33
    /**
34
     * Retrieve photos of the user.
35
     *
36
     * @param string $username
37
     * @param array  $params
38
     *
39
     * @return mixed
40
     */
41
    public function photos($username, array $params)
42
    {
43
        return $this->call('users/'.$username.'/photos', $params);
44
    }
45
46
    /**
47
     * Retrieve photos liked by the user.
48
     *
49
     * @param string $username
50
     * @param array  $params
51
     *
52
     * @return mixed
53
     */
54
    public function likes($username, array $params)
55
    {
56
        return $this->call('users/'.$username.'/likes', $params);
57
    }
58
59
    /**
60
     * Retrieve collections of the user.
61
     *
62
     * @param string $username
63
     * @param array  $params
64
     *
65
     * @return mixed
66
     */
67
    public function collections($username, array $params)
68
    {
69
        return $this->call('users/'.$username.'/collections', $params);
70
    }
71
72
    /**
73
     * Retrieve statistics of the user.
74
     *
75
     * @param string $username
76
     * @param array  $params
77
     *
78
     * @return mixed
79
     */
80
    public function statistics($username, array $params)
81
    {
82
        return $this->call('users/'.$username.'/statistics', $params);
83
    }
84
}
85