Completed
Push — master ( 1e0bdf...0e0b28 )
by Sergey
09:20 queued 10s
created

BoardHelper::parseBoardsInfoResponse()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 8
Ratio 100 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 8
loc 8
rs 9.4286
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Helpers;
4
5
class BoardHelper extends RequestHelper
6
{
7
    /**
8
     * Creates Pinterest API request to get boards info
9
     *
10
     * @return array
11
     */
12
    public static function createBoardsInfoRequest()
13
    {
14
        $dataJson = [
15
            "options" => [
16
                "filter"        => "all",
17
                "field_set_key" => "board_picker",
18
            ],
19
            "context" => [],
20
        ];
21
22
        return [
23
            "source_url"  => "/pin/create/bookmarklet/?url=",
24
            "pinFave"     => "1",
25
            "description" => "",
26
            "data"        => json_encode($dataJson, JSON_FORCE_OBJECT),
27
        ];
28
    }
29
}
30