Completed
Push — master ( 598848...fdd2e6 )
by Sergey
23:05 queued 17:57
created

PinnerHelper::createUserDataRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 5
nc 1
nop 3
1
<?php
2
3
namespace seregazhuk\PinterestBot\Helpers\Requests;
4
5
use seregazhuk\PinterestBot\Api\Request;
6
7
class PinnerHelper
8
{
9
    /**
10
     * Creates Pinterest API request to login
11
     *
12
     * @param string $username
13
     * @param string $password
14
     * @return array
15
     */
16
    public static function createLoginRequest($username, $password)
17
    {
18
        $dataJson = [
19
            "options" => [
20
                "username_or_email" => $username,
21
                "password"          => $password
22
            ],
23
        ];
24
        return Request::createRequestData($dataJson, "/login/");
25
    }
26
}
27