Passed
Branch development-2.0 (f1893c)
by Jonathan
06:14
created

FileFormatsTrait::getTemplateFormats()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * ReportingCloud PHP Wrapper
6
 *
7
 * PHP wrapper for ReportingCloud Web API. Authored and supported by Text Control GmbH.
8
 *
9
 * @link      https://www.reporting.cloud to learn more about ReportingCloud
10
 * @link      https://github.com/TextControl/txtextcontrol-reportingcloud-php for the canonical source repository
11
 * @license   https://raw.githubusercontent.com/TextControl/txtextcontrol-reportingcloud-php/master/LICENSE.md
12
 * @copyright © 2019 Text Control GmbH
13
 */
14
15
namespace TxTextControl\ReportingCloud\Assert;
16
17
/**
18
 * Trait FileFormatsTrait
19
 *
20
 * @package TxTextControl\ReportingCloud
21
 */
22
trait FileFormatsTrait
23
{
24
    /**
25
     * Return array of image formats (extensions) supported by ReportingCloud
26
     *
27
     * @return array
28
     */
29 5
    public static function getImageFormats(): array
30
    {
31
        return [
32 5
            'BMP',
33
            'GIF',
34
            'JPG',
35
            'PNG',
36
        ];
37
    }
38
39
    /**
40
     * Return array of template formats (extensions) supported by ReportingCloud
41
     *
42
     * @return array
43
     */
44 46
    public static function getTemplateFormats(): array
45
    {
46
        return [
47 46
            'DOC',
48
            'DOCX',
49
            'RTF',
50
            'TX',
51
        ];
52
    }
53
54
    /**
55
     * Return array of document formats (extensions) supported by ReportingCloud
56
     *
57
     * @return array
58
     */
59 10
    public static function getDocumentFormats(): array
60
    {
61
        return [
62 10
            'DOC',
63
            'DOCX',
64
            'HTML',
65
            'PDF',
66
            'RTF',
67
            'TX',
68
        ];
69
    }
70
71
    /**
72
     * Return array of return formats (extensions) supported by ReportingCloud
73
     *
74
     * @return array
75
     */
76 28
    public static function getReturnFormats(): array
77
    {
78
        return [
79 28
            'DOC',
80
            'DOCX',
81
            'HTML',
82
            'PDF',
83
            'PDFA',
84
            'RTF',
85
            'TX',
86
        ];
87
    }
88
}
89