Completed
Push — master ( 50a9e6...dccb70 )
by Steven
02:20
created

SearchTrait::getSearch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php namespace Stevenmaguire\Services\Trello\Traits;
2
3
trait SearchTrait
4
{
5
    /**
6
     * Retrieves currently configured http broker.
7
     *
8
     * @return Stevenmaguire\Services\Trello\Http
9
     * @codeCoverageIgnore
10
     */
11
    abstract public function getHttp();
12
13
    /**
14
     * Retrieves http response from Trello api for search query.
15
     *
16
     * @param  array $attributes
17
     *
18
     * @return object
19
     */
20 2
    public function getSearch($attributes = [])
21
    {
22 2
        return $this->getHttp()->get('search', $attributes);
23
    }
24
25
    /**
26
     * Retrieves http response from Trello api for member search query.
27
     *
28
     * @param  array $attributes
29
     *
30
     * @return object
31
     */
32 2
    public function getSearchMembers($attributes = [])
33
    {
34 2
        return $this->getHttp()->get('search/members', $attributes);
35
    }
36
}
37