Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 250-258 (lines=9) @@
247
        return $this->type_id;
248
    }
249
250
    public function getTypeTitle()
251
    {
252
        if ($this->type_id) {
253
            $types = Type::cachedListArray(['key' => 'id']);
254
            if (array_key_exists($this->type_id, $types)) {
255
                return $types[$this->type_id];
256
            }
257
        }
258
    }
259
260
    public function getTypeSlug()
261
    {
@@ 260-268 (lines=9) @@
257
        }
258
    }
259
260
    public function getTypeSlug()
261
    {
262
        if ($this->type_id) {
263
            $types = Type::cachedListArray(['key' => 'id', 'value' => 'slug']);
264
            if (array_key_exists($this->type_id, $types)) {
265
                return $types[$this->type_id];
266
            }
267
        }
268
    }
269
270
    public function getTypeDisplayDate()
271
    {
@@ 270-278 (lines=9) @@
267
        }
268
    }
269
270
    public function getTypeDisplayDate()
271
    {
272
        if ($this->type_id) {
273
            $types = Type::cachedListArray(['key' => 'id', 'value' => 'display_date']);
274
            if (array_key_exists($this->type_id, $types)) {
275
                return $types[$this->type_id];
276
            }
277
        }
278
    }
279
280
    public function setPreviewInner($preview_inner)
281
    {