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

File   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 14.29%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBasePath() 0 3 1
A getAcceptedMimeTypes() 0 13 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/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