WorkflowResource::getResourceMethodConfiguration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
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\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