Passed
Push — master ( feec22...d030f3 )
by Milan
01:50
created

FilterFactory::createDocument()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 10
nc 1
nop 0
1
<?php
2
3
namespace h4kuna\Upload\Upload;
4
5
class FilterFactory
6
{
7
8
	/** @return Filter */
9
	public static function createImage()
10
	{
11
		return new Filter('image/png', 'image/pjpeg', 'image/jpeg', 'image/gif');
12
	}
13
14
15
	public static function createAudio()
16
	{
17
		return new Filter(
18
			'audio/mpeg3',
19
			'audio/x-mpeg-3',
20
			'audio/ogg',
21
			'audio/x-aiff');
22
	}
23
24
25
	public static function createDocument()
26
	{
27
		return new Filter(
28
			'text/plain',
29
			'application/msword',
30
			'application/vnd.ms-excel',
31
			'application/pdf',
32
			'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
33
			'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
34
			'application/vnd.ms-powerpoint',
35
			'application/vnd.openxmlformats-officedocument.presentationml.presentation');
36
	}
37
}