Update::update()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Digikraaft\Mono\ApiOperations;
4
5
trait Update
6
{
7
    use Request;
8
9
    /**
10
     * @param string $id
11
     * @param $params
12
     * @return array|object
13
     * @throws \Digikraaft\Mono\Exceptions\InvalidArgumentException
14
     * @throws \Digikraaft\Mono\Exceptions\IsNullException
15
     */
16
    public static function update(string $id, $params)
17
    {
18
        self::validateParams($params, true);
19
        $url = resourceUrl($id);
0 ignored issues
show
Bug introduced by
The function resourceUrl was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        $url = /** @scrutinizer ignore-call */ resourceUrl($id);
Loading history...
20
21
        return static::staticRequest('PUT', $url, $params);
22
    }
23
}
24