UserResource   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 21
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

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