UnsplashCollections   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 75
Duplicated Lines 0 %

Importance

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

6 Methods

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