UserResource::getResourceMethodConfiguration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the zibios/wrike-php-library package.
7
 *
8
 * (c) Zbigniew Ślązak
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zibios\WrikePhpLibrary\Resource;
15
16
use Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum;
17
use Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum;
18
use Zibios\WrikePhpLibrary\Resource\Traits\GetByIdTrait;
19
use Zibios\WrikePhpLibrary\Resource\Traits\UpdateTrait;
20
21
/**
22
 * User Resource.
23
 */
24
class UserResource extends AbstractResource
25
{
26
    use GetByIdTrait;
27
    use UpdateTrait;
28
29
    /**
30
     * Return connection array ResourceMethod => RequestPathFormat.
31
     *
32
     * @see \Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum
33
     * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum
34
     *
35
     * @return array
36
     */
37 2
    protected function getResourceMethodConfiguration(): array
38
    {
39
        return [
40 2
            ResourceMethodEnum::GET_BY_ID => RequestPathFormatEnum::USERS_BY_ID,
41
            ResourceMethodEnum::UPDATE => RequestPathFormatEnum::USERS_BY_ID,
42
        ];
43
    }
44
}
45