Completed
Pull Request — master (#19)
by Sergey
03:32
created

BoardHelper::createBoardsInfoRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 9.4286
cc 1
eloc 11
nc 1
nop 0
1
<?php
2
3
namespace seregazhuk\PinterestBot\Helpers\Requests;
4
5
class BoardHelper
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