Code Duplication    Length = 8-9 lines in 5 locations

app/Models/ColumnRestrictionModel.php 1 location

@@ 38-46 (lines=9) @@
35
     *
36
     * @return array
37
     */
38
    public function getRules()
39
    {
40
        return [
41
            self::RULE_ALLOW_TASK_CREATION   => t('Task creation is permitted for this column'),
42
            self::RULE_ALLOW_TASK_OPEN_CLOSE => t('Closing or opening a task is permitted for this column'),
43
            self::RULE_BLOCK_TASK_CREATION   => t('Task creation is blocked for this column'),
44
            self::RULE_BLOCK_TASK_OPEN_CLOSE => t('Closing or opening a task is blocked for this column'),
45
        ];
46
    }
47
48
    /**
49
     * Fetch one restriction.

app/Models/ProjectRoleRestrictionModel.php 1 location

@@ 37-44 (lines=8) @@
34
     *
35
     * @return array
36
     */
37
    public function getRules()
38
    {
39
        return [
40
            self::RULE_TASK_CREATION   => t('Task creation is not permitted'),
41
            self::RULE_TASK_OPEN_CLOSE => t('Closing or opening a task is not permitted'),
42
            self::RULE_TASK_MOVE       => t('Moving a task is not permitted'),
43
        ];
44
    }
45
46
    /**
47
     * Get a single restriction.

app/Models/SubtaskModel.php 1 location

@@ 68-75 (lines=8) @@
65
     *
66
     * @return string[]
67
     */
68
    public function getStatusList()
69
    {
70
        return [
71
            self::STATUS_TODO       => t('Todo'),
72
            self::STATUS_INPROGRESS => t('In progress'),
73
            self::STATUS_DONE       => t('Done'),
74
        ];
75
    }
76
77
    /**
78
     * Get the query to fetch subtasks assigned to a user.

app/Models/UserNotificationFilterModel.php 1 location

@@ 43-51 (lines=9) @@
40
     *
41
     * @return array
42
     */
43
    public function getFilters()
44
    {
45
        return [
46
            self::FILTER_NONE     => t('All tasks'),
47
            self::FILTER_ASSIGNEE => t('Only for tasks assigned to me'),
48
            self::FILTER_CREATOR  => t('Only for tasks created by me'),
49
            self::FILTER_BOTH     => t('Only for tasks created by me and assigned to me'),
50
        ];
51
    }
52
53
    /**
54
     * Get user selected filter.

app/Foundation/Security/Role.php 1 location

@@ 47-54 (lines=8) @@
44
     *
45
     * @return array
46
     */
47
    public function getProjectRoles()
48
    {
49
        return [
50
            self::PROJECT_MANAGER => t('Project Manager'),
51
            self::PROJECT_MEMBER  => t('Project Member'),
52
            self::PROJECT_VIEWER  => t('Project Viewer'),
53
        ];
54
    }
55
56
    /**
57
     * Check if the given role is custom or not.