UnsplashSearch   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A photos() 0 5 1
A collections() 0 5 1
A users() 0 5 1
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