PhpDecoder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A decode() 0 4 1
A getMimeType() 0 4 1
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