Completed
Push — master ( e27817...bb2336 )
by Morris
17:59
created

HEIC   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMimeType() 0 3 1
A isAvailable() 0 3 1
1
<?php
2
/**
3
 * @author Thomas Müller <[email protected]>
4
 *
5
 * @copyright Copyright (c) 2018, ownCloud GmbH
6
 * @copyright Copyright (c) 2018, Sebastian Steinmetz ([email protected])
7
 * @license AGPL-3.0
8
 *
9
 * This code is free software: you can redistribute it and/or modify
10
 * it under the terms of the GNU Affero General Public License, version 3,
11
 * as published by the Free Software Foundation.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU Affero General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public License, version 3,
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
20
 *
21
 */
22
23
namespace OC\Preview;
24
25
class HEIC extends Bitmap {
26
	/**
27
	 * {@inheritDoc}
28
	 */
29
	public function getMimeType() {
30
		return '/image\/hei(f|c)/';
31
	}
32
33
	/**
34
	 * {@inheritDoc}
35
	 */
36
	public function isAvailable(\OCP\Files\FileInfo $file) {
37
		return in_array("HEIC", \Imagick::queryFonts("HEI*") );
38
	}
39
40
}
41