Failed Conditions
Push — master ( 5e6761...398dce )
by Adrien
04:14 queued 01:57
created

File   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBasePath() 0 3 1
A getAcceptedMimeTypes() 0 12 1
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/gif',
24
            'image/jpeg',
25
            'image/pjpeg',
26
            'image/png',
27
            'image/svg+xml',
28
            'image/webp',
29
            'application/pdf',
30
            'application/x-pdf',
31
        ];
32
    }
33
}
34