Code Duplication    Length = 27-27 lines in 2 locations

src/Resource/CustomFieldResource.php 1 location

@@ 27-53 (lines=27) @@
24
/**
25
 * Custom Field Resource.
26
 */
27
class CustomFieldResource extends AbstractResource
28
{
29
    use GetAllTrait;
30
    use GetByIdTrait;
31
    use GetByIdsTrait;
32
    use CreateTrait;
33
    use UpdateTrait;
34
35
    /**
36
     * Return connection array ResourceMethod => RequestPathFormat.
37
     *
38
     * @see \Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum
39
     * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum
40
     *
41
     * @return array
42
     */
43
    protected function getResourceMethodConfiguration(): array
44
    {
45
        return [
46
            ResourceMethodEnum::GET_ALL => RequestPathFormatEnum::CUSTOM_FIELDS,
47
            ResourceMethodEnum::GET_BY_ID => RequestPathFormatEnum::CUSTOM_FIELDS_BY_ID,
48
            ResourceMethodEnum::GET_BY_IDS => RequestPathFormatEnum::CUSTOM_FIELDS_BY_IDS,
49
            ResourceMethodEnum::CREATE => RequestPathFormatEnum::CUSTOM_FIELDS,
50
            ResourceMethodEnum::UPDATE => RequestPathFormatEnum::CUSTOM_FIELDS_BY_ID,
51
        ];
52
    }
53
}
54

src/Resource/GroupResource.php 1 location

@@ 27-53 (lines=27) @@
24
/**
25
 * Group Resource.
26
 */
27
class GroupResource extends AbstractResource
28
{
29
    use GetAllTrait;
30
    use GetByIdTrait;
31
    use CreateTrait;
32
    use UpdateTrait;
33
    use DeleteTrait;
34
35
    /**
36
     * Return connection array ResourceMethod => RequestPathFormat.
37
     *
38
     * @see \Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum
39
     * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum
40
     *
41
     * @return array
42
     */
43
    protected function getResourceMethodConfiguration(): array
44
    {
45
        return [
46
            ResourceMethodEnum::GET_ALL => RequestPathFormatEnum::GROUPS,
47
            ResourceMethodEnum::GET_BY_ID => RequestPathFormatEnum::GROUPS_BY_ID,
48
            ResourceMethodEnum::CREATE => RequestPathFormatEnum::GROUPS,
49
            ResourceMethodEnum::UPDATE => RequestPathFormatEnum::GROUPS_BY_ID,
50
            ResourceMethodEnum::DELETE => RequestPathFormatEnum::GROUPS_BY_ID,
51
        ];
52
    }
53
}
54