Feed::createFeedItem()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 6
nc 1
nop 4
1
<?php
2
3
namespace Amelia\Monzo\Api;
4
5
trait Feed
6
{
7
    /**
8
     * Create a new feed item.
9
     *
10
     * @param string $title
11
     * @param array $params
12
     * @param string|null $url
13
     * @param string|null $account
14
     */
15
    public function createFeedItem(string $title, array $params, string $url = null, string $account = null)
16
    {
17
        $this->call('POST', 'feed', [], [
18
            'account_id' => $account ?? $this->getAccountId(),
19
            'title' => $title,
20
            'url' => $url,
21
            'params' => $params,
22
            'type' => 'basic',
23
        ]);
24
    }
25
}
26