Completed
Push — master ( 36782f...ab5f43 )
by Sergey
06:23 queued 04:02
created

Suggestions   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getForQuery() 0 7 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Providers;
4
5
use seregazhuk\PinterestBot\Api\Providers\Core\Provider;
6
use seregazhuk\PinterestBot\Helpers\UrlBuilder;
7
8
class Suggestions extends Provider
9
{
10
    /**
11
     * @param string $query
12
     * @return array|bool
13
     */
14
    public function getForQuery($query)
15
    {
16
        return $this->get(UrlBuilder::RESOURCE_TYPE_AHEAD_SUGGESTIONS, [
17
            'term' => $query,
18
            'pin_scope' => 'pins'
19
        ]);
20
    }
21
}
22