Completed
Pull Request — master (#99)
by Sergey
04:35 queued 02:05
created

HasFollowers::getData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 7
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 4
1
<?php
2
3
namespace seregazhuk\PinterestBot\Helpers\Providers\Traits;
4
5
use Iterator;
6
use seregazhuk\PinterestBot\Helpers\Pagination;
7
8
trait HasFollowers
9
{
10
    use ProviderTrait;
11
12
    /**
13
     * @param array  $data
14
     * @param string $resourceUrl
15
     * @param string $sourceUrl
16
     * @param int    $batchesLimit
17
     *
18
     * @return Iterator
19
     */
20
    public function getFollowData($data, $resourceUrl, $sourceUrl, $batchesLimit = 0)
21
    {
22
        $requestData = array_merge([$data, $resourceUrl, $sourceUrl]);
23
24
        return (new Pagination($this))->run('getPaginatedData', $requestData, $batchesLimit);
25
    }
26
}
27