Passed
Push — master ( c7d7ec...eff4fb )
by Sam
15:35
created

File::getAcceptedMimeTypes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 18
rs 9.7333
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Model;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use GraphQL\Doctrine\Annotation as API;
9
10
/**
11
 * An uploaded file, digital copy of a magazine.
12
 *
13
 * @ORM\HasLifecycleCallbacks
14
 * @ORM\Entity(repositoryClass="Application\Repository\FileRepository")
15
 * @ORM\Table(uniqueConstraints={
16
 *     @ORM\UniqueConstraint(name="unique_name", columns={"filename"})
17
 * })
18
 */
19
class File extends AbstractModel implements \Ecodev\Felix\Model\File
20
{
21
    use \Ecodev\Felix\Model\Traits\File;
22
23
    protected function getAcceptedMimeTypes(): array
24
    {
25
        return [
26
            'image/bmp',
27
            'image/x-ms-bmp',
28
            'image/gif',
29
            'image/jpeg',
30
            'image/pjpeg',
31
            'image/png',
32
            'image/svg+xml',
33
            'image/webp',
34
            'application/pdf',
35
            'application/x-pdf',
36
            'application/pdf',
37
            'application/msword',
38
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
39
            'application/vnd.ms-excel',
40
            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
41
        ];
42
    }
43
}
44