Icons::table()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 1
cp 0
crap 2
rs 10
c 1
b 0
f 0
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