Modify::send()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
namespace ArianRashidi\PocketApi\Api;
3
4
/**
5
 * Class Modify
6
 *
7
 * @package ArianRashidi\PocketApi\Api
8
 */
9
class Modify extends Api
10
{
11
    /**
12
     * Modify saved Pocket items.
13
     *
14
     * @param array $actions
15
     *
16
     * @return mixed
17
     */
18
    public function send(array $actions)
19
    {
20
        $data = $this->keys() + ['actions' => json_encode($actions)];
21
22
        $response = $this->request('/v3/send', $data, 'x-www-form-urlencoded');
23
        $responseData = json_decode($response->getBody());
24
25
        return $responseData;
26
    }
27
}
28