HasRelatedTopics::getRelatedTopics()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Traits;
4
5
use seregazhuk\PinterestBot\Helpers\UrlBuilder;
6
7
trait HasRelatedTopics
8
{
9
    use HandlesRequest;
10
11
    /**
12
     * Returns a list of related topics.
13
     *
14
     * @param string $interest
15
     * @return array|bool
16
     */
17
    public function getRelatedTopics($interest)
18
    {
19
        return $this->get(
20
            UrlBuilder::RESOURCE_GET_CATEGORIES_RELATED,
21
            ['interest_name' => $interest]
22
        );
23
    }
24
}
25