Code Duplication    Length = 9-9 lines in 2 locations

app/modules/Publication/Model/Publication.php 2 locations

@@ 236-244 (lines=9) @@
233
        return $this->type_id;
234
    }
235
236
    public function getTypeTitle()
237
    {
238
        if ($this->type_id) {
239
            $types = Type::cachedListArray(['key' => 'id']);
240
            if (array_key_exists($this->type_id, $types)) {
241
                return $types[$this->type_id];
242
            }
243
        }
244
    }
245
246
    public function getTypeSlug()
247
    {
@@ 246-254 (lines=9) @@
243
        }
244
    }
245
246
    public function getTypeSlug()
247
    {
248
        if ($this->type_id) {
249
            $types = Type::cachedListArray(['key' => 'id', 'value' => 'slug']);
250
            if (array_key_exists($this->type_id, $types)) {
251
                return $types[$this->type_id];
252
            }
253
        }
254
    }
255
256
    public function setPreviewInner($preview_inner)
257
    {