Icons   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 23
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A table() 0 3 1
A icon() 0 3 1
1
<?php
2
3
namespace Terranet\Administrator\Media;
4
5
use Illuminate\Support\Arr;
6
7
class Icons
8
{
9
    protected static $table = [
10
        'Dir' => 'fa fa-folder-open-o',
11
        'Pdf' => 'fa fa-file-pdf-o',
12
        'Code' => 'fa fa-file-code-o',
13
        'Excel' => 'fa fa-file-excel-o',
14
        'Word' => 'fa fa-file-word-o',
15
        'PowerPoint' => 'fa fa-file-powerpoint-o',
16
        'Archive' => 'fa fa-file-archive-o',
17
        'Image' => 'fa fa-file-image-o',
18
        'Audio' => 'fa fa-file-audio-o',
19
        'Movie' => 'fa fa-file-video-o',
20
    ];
21
22
    public function table()
23
    {
24
        return array_keys(static::$table);
25
    }
26
27
    public function icon($group)
28
    {
29
        return Arr::get(static::$table, $group, 'fa fa-file-text-o');
30
    }
31
}
32