TextAlbum   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
c 1
b 0
f 0
dl 0
loc 24
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getAlbumType() 0 3 1
A getOtherFiles() 0 3 1
A getBehaviorAttributes() 0 3 1
1
<?php
2
3
namespace Itstructure\MFU\Models\Albums;
4
5
use Illuminate\Database\Eloquent\Collection;
6
use Itstructure\MFU\Processors\SaveProcessor;
7
8
/**
9
 * Class TextAlbum
10
 * @package Itstructure\MFU\Models\Albums
11
 */
12
class TextAlbum extends AlbumTyped
13
{
14
    /**
15
     * @return Collection
16
     */
17
    public function getOtherFiles(): Collection
18
    {
19
        return $this->getMediaFiles(static::getFileType());
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public static function getAlbumType(): string
26
    {
27
        return static::ALBUM_TYPE_TEXT;
28
    }
29
30
    /**
31
     * @return array
32
     */
33
    public static function getBehaviorAttributes(): array
34
    {
35
        return [SaveProcessor::FILE_TYPE_TEXT, SaveProcessor::FILE_TYPE_THUMB];
36
    }
37
}
38