Completed
Push — master ( 6ea9b4...222850 )
by Andreas
04:32
created

OpenDocumentTypeMap   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 27
ccs 16
cts 16
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMap() 0 19 1
1
<?php
2
/**
3
 * OpenDocumentTypeMap.
4
 *
5
 * @copyright 2018 Institute of Legal Medicine, Medical University of Innsbruck
6
 * @author Andreas Erhard <[email protected]>
7
 * @license LGPL-3.0-only
8
 * @link http://www.gerichtsmedizin.at/
9
 *
10
 * @package fileinfo
11
 */
12
namespace Gmi\Toolkit\Fileinfo\Type;
13
14
/**
15
 * Type mapping provider for OpenDocument (OpenOffice, LibreOffice, ...) filetypes.
16
 */
17
class OpenDocumentTypeMap implements TypeMapInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     *
22
     * @see https://wiki.documentfoundation.org/Faq/General/036
23
     */
24 9
    public function getMap()
25
    {
26
        return [
27 9
            new Type(['odt'], 'application/vnd.oasis.opendocument.text'),
28 9
            new Type(['ott'], 'application/vnd.oasis.opendocument.text-template'),
29 9
            new Type(['oth'], 'application/vnd.oasis.opendocument.text-web'),
30 9
            new Type(['odm'], 'application/vnd.oasis.opendocument.text-master'),
31 9
            new Type(['ods'], 'application/vnd.oasis.opendocument.spreadsheet'),
32 9
            new Type(['ots'], 'application/vnd.oasis.opendocument.spreadsheet-template'),
33 9
            new Type(['odc'], 'application/vnd.oasis.opendocument.chart'),
34 9
            new Type(['odp'], 'application/vnd.oasis.opendocument.presentation'),
35 9
            new Type(['otp'], 'application/vnd.oasis.opendocument.presentation-template'),
36 9
            new Type(['odg'], 'application/vnd.oasis.opendocument.graphics'),
37 9
            new Type(['otg'], 'application/vnd.oasis.opendocument.graphics-template'),
38 9
            new Type(['odf'], 'application/vnd.oasis.opendocument.formula'),
39 9
            new Type(['odb'], 'application/vnd.oasis.opendocument.database'),
40 9
            new Type(['odi'], 'application/vnd.oasis.opendocument.image'),
41 9
        ];
42
    }
43
}
44