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

SearchTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 34
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
getHttp() 0 1 ?
A getSearch() 0 4 1
A getSearchMembers() 0 4 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