Code Duplication    Length = 35-35 lines in 2 locations

src/Resource/CommentResource.php 1 location

@@ 31-65 (lines=35) @@
28
/**
29
 * Comment Resource.
30
 */
31
class CommentResource extends AbstractResource
32
{
33
    use GetAllTrait;
34
    use GetAllForFolderTrait;
35
    use GetAllForTaskTrait;
36
    use GetByIdTrait;
37
    use GetByIdsTrait;
38
    use CreateForFolderTrait;
39
    use CreateForTaskTrait;
40
    use UpdateTrait;
41
    use DeleteTrait;
42
43
    /**
44
     * Return connection array ResourceMethod => RequestPathFormat.
45
     *
46
     * @see \Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum
47
     * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum
48
     *
49
     * @return array
50
     */
51
    protected function getResourceMethodConfiguration(): array
52
    {
53
        return [
54
            ResourceMethodEnum::GET_ALL => RequestPathFormatEnum::COMMENTS,
55
            ResourceMethodEnum::GET_ALL_FOR_FOLDER => RequestPathFormatEnum::COMMENTS_FOR_FOLDER,
56
            ResourceMethodEnum::GET_ALL_FOR_TASK => RequestPathFormatEnum::COMMENTS_FOR_TASK,
57
            ResourceMethodEnum::GET_BY_ID => RequestPathFormatEnum::COMMENTS_BY_ID,
58
            ResourceMethodEnum::GET_BY_IDS => RequestPathFormatEnum::COMMENTS_BY_IDS,
59
            ResourceMethodEnum::CREATE_FOR_FOLDER => RequestPathFormatEnum::COMMENTS_FOR_FOLDER,
60
            ResourceMethodEnum::CREATE_FOR_TASK => RequestPathFormatEnum::COMMENTS_FOR_TASK,
61
            ResourceMethodEnum::UPDATE => RequestPathFormatEnum::COMMENTS_BY_ID,
62
            ResourceMethodEnum::DELETE => RequestPathFormatEnum::COMMENTS_BY_ID,
63
        ];
64
    }
65
}
66

src/Resource/TimelogResource.php 1 location

@@ 31-65 (lines=35) @@
28
/**
29
 * Timelog Resource.
30
 */
31
class TimelogResource extends AbstractResource
32
{
33
    use GetAllTrait;
34
    use GetAllForContactTrait;
35
    use GetAllForFolderTrait;
36
    use GetAllForTaskTrait;
37
    use GetAllForTimelogCategoryTrait;
38
    use GetByIdTrait;
39
    use CreateForTaskTrait;
40
    use UpdateTrait;
41
    use DeleteTrait;
42
43
    /**
44
     * Return connection array ResourceMethod => RequestPathFormat.
45
     *
46
     * @see \Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum
47
     * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum
48
     *
49
     * @return array
50
     */
51
    protected function getResourceMethodConfiguration(): array
52
    {
53
        return [
54
            ResourceMethodEnum::GET_ALL => RequestPathFormatEnum::TIMELOGS,
55
            ResourceMethodEnum::GET_ALL_FOR_CONTACT => RequestPathFormatEnum::TIMELOGS_FOR_CONTACT,
56
            ResourceMethodEnum::GET_ALL_FOR_FOLDER => RequestPathFormatEnum::TIMELOGS_FOR_FOLDER,
57
            ResourceMethodEnum::GET_ALL_FOR_TASK => RequestPathFormatEnum::TIMELOGS_FOR_TASK,
58
            ResourceMethodEnum::GET_ALL_FOR_TIMELOG_CATEGORY => RequestPathFormatEnum::TIMELOGS_FOR_TIMELOG_CATEGORY,
59
            ResourceMethodEnum::GET_BY_ID => RequestPathFormatEnum::TIMELOGS_BY_ID,
60
            ResourceMethodEnum::CREATE_FOR_TASK => RequestPathFormatEnum::TIMELOGS_FOR_TASK,
61
            ResourceMethodEnum::UPDATE => RequestPathFormatEnum::TIMELOGS_BY_ID,
62
            ResourceMethodEnum::DELETE => RequestPathFormatEnum::TIMELOGS_BY_ID,
63
        ];
64
    }
65
}
66