PhpDecoder::getMimeType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Michaels\Manager\Decoders;
3
4
use Michaels\Manager\Contracts\DecoderInterface;
5
6
/**
7
 * A wrapper for the PHP Decoder Module for the data manager file loader.
8
 *
9
 * @package Michaels\Manager
10
 */
11
class PhpDecoder implements DecoderInterface
12
{
13
14
    /**
15
     * This is the method, which does the decoding work.
16
     *
17
     * @param $data
18
     * @return array
19
     */
20
    public function decode($data)
21
    {
22
        return $data;
23
    }
24
25
    /**
26
     * The data returned is the actual file extensions supported for the files to decode.
27
     * For instance, if you want to decode Yaml files with the extensions ".yml" and ".yaml",
28
     * then you want to set the return array to ['yaml', 'yml'].
29
     *
30
     * @return array
31
     */
32
    public function getMimeType()
33
    {
34
        return ['php'];
35
    }
36
}
37