WorkflowResource   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getResourceMethodConfiguration() 0 8 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\CreateTrait;
19
use Zibios\WrikePhpLibrary\Resource\Traits\GetAllTrait;
20
use Zibios\WrikePhpLibrary\Resource\Traits\UpdateTrait;
21
22
/**
23
 * Workflow Resource.
24
 */
25
class WorkflowResource extends AbstractResource
26
{
27
    use GetAllTrait;
28
    use CreateTrait;
29
    use UpdateTrait;
30
31
    /**
32
     * Return connection array ResourceMethod => RequestPathFormat.
33
     *
34
     * @see \Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum
35
     * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum
36
     *
37
     * @return array
38
     */
39 3
    protected function getResourceMethodConfiguration(): array
40
    {
41
        return [
42 3
            ResourceMethodEnum::GET_ALL => RequestPathFormatEnum::WORKFLOWS,
43
            ResourceMethodEnum::CREATE => RequestPathFormatEnum::WORKFLOWS,
44
            ResourceMethodEnum::UPDATE => RequestPathFormatEnum::WORKFLOWS_BY_ID,
45
        ];
46
    }
47
}
48