Failed Conditions
Push — master ( 7aeedc...f7e5fc )
by Adrien
05:38 queued 02:24
created

File::getAcceptedMimeTypes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 13
ccs 0
cts 12
cp 0
rs 9.9
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ecodev\Felix\Model\Traits;
6
7
/**
8
 * An uploaded file.
9
 */
10
trait File
11
{
12
    use AbstractFile;
13
14 1
    protected function getBasePath(): string
15
    {
16 1
        return 'data/file/';
17
    }
18
19
    protected function getAcceptedMimeTypes(): array
20
    {
21
        return [
22
            'image/bmp',
23
            'image/x-ms-bmp',
24
            'image/gif',
25
            'image/jpeg',
26
            'image/pjpeg',
27
            'image/png',
28
            'image/svg+xml',
29
            'image/webp',
30
            'application/pdf',
31
            'application/x-pdf',
32
        ];
33
    }
34
}
35