Completed
Push — master ( 523146...d3886c )
by Sergey
03:44
created

PinnerHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createLoginRequest() 0 10 1
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