UnsplashSearch::collections()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 5
rs 10
1
<?php
2
3
namespace shweshi\LaravelUnsplashWrapper;
4
5
class UnsplashSearch extends BaseClass
6
{
7
    /**
8
     * Search for the photos with search query.
9
     *
10
     * @param string $query
11
     * @param array  $params
12
     *
13
     * @return mixed
14
     */
15
    public function photos($query, array $params)
16
    {
17
        $params['query'] = $query;
18
19
        return $this->call('search/photos', $params);
20
    }
21
22
    /**
23
     * Search for the collections with search query.
24
     *
25
     * @param string $query
26
     * @param array  $params
27
     *
28
     * @return mixed
29
     */
30
    public function collections($query, array $params)
31
    {
32
        $params['query'] = $query;
33
34
        return $this->call('search/collections', $params);
35
    }
36
37
    /**
38
     * Search for the users with search query.
39
     *
40
     * @param string $query
41
     * @param array  $params
42
     *
43
     * @return mixed
44
     */
45
    public function users($query, array $params)
46
    {
47
        $params['query'] = $query;
48
49
        return $this->call('search/users', $params);
50
    }
51
}
52