Code Duplication    Length = 9-11 lines in 2 locations

Apps/Model/Admin/Content/FormCategoryDelete.php 1 location

@@ 107-117 (lines=11) @@
104
     * Get allowed category ids as array (string values for validation)
105
     * @return array
106
     */
107
    public function categoryIds()
108
    {
109
        $data = ContentCategory::getSortedCategories();
110
        $response = [];
111
        foreach ($data as $key=>$val) {
112
            if ($this->_record->id !== $key) {
113
                $response[] = (string)$key;
114
            }
115
        }
116
        return $response;
117
    }
118
}

Apps/Model/Admin/Content/FormContentUpdate.php 1 location

@@ 179-187 (lines=9) @@
176
     * Get allowed category ids as array (string values for validation)
177
     * @return array
178
     */
179
    public function categoryIds()
180
    {
181
        $data = ContentCategory::getSortedCategories();
182
        $response = [];
183
        foreach ($data as $key=>$val) {
184
            $response[] = (string)$key;
185
        }
186
        return $response;
187
    }
188
189
    /**
190
     * Validate path filter