Code Duplication    Length = 9-11 lines in 3 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

@@ 202-210 (lines=9) @@
199
     * Get allowed category ids as array (string values for validation)
200
     * @return array
201
     */
202
    public function categoryIds()
203
    {
204
        $data = ContentCategory::getSortedCategories();
205
        $response = [];
206
        foreach ($data as $key=>$val) {
207
            $response[] = (string)$key;
208
        }
209
        return $response;
210
    }
211
212
    /**
213
     * Validate path filter

Apps/Model/Front/Content/FormNarrowContentUpdate.php 1 location

@@ 185-193 (lines=9) @@
182
     * Get allowed category ids as array (string values for validation)
183
     * @return array
184
     */
185
    public function categoryIds()
186
    {
187
        $data = ContentCategory::getSortedCategories();
188
        $response = [];
189
        foreach ($data as $key=>$val) {
190
            $response[] = (string)$key;
191
        }
192
        return $response;
193
    }
194
195
    public function validatePath()
196
    {