Code Duplication    Length = 11-11 lines in 2 locations

Serialize/class.JSONSerializer.php 1 location

@@ 8-18 (lines=11) @@
5
{
6
    private $types = array('json', 'application/json', 'application/x-javascript', 'text/javascript', 'text/x-javascript', 'text/x-json');
7
8
    public function supportsType($type)
9
    {
10
        foreach($this->types as $t)
11
        {
12
            if(strcasecmp($t, $type) === 0)
13
            {
14
                return true;
15
            }
16
        }
17
        return false;
18
    }
19
 
20
    public function serializeData($type, $array)
21
    {

Serialize/class.SpreadSheetSerializer.php 1 location

@@ 6-16 (lines=11) @@
3
4
abstract class SpreadSheetSerializer implements ISerializer
5
{
6
    public function supportsType($type)
7
    {
8
        foreach($this->types as $t)
9
        {
10
            if(strcasecmp($t, $type) === 0)
11
            {
12
                return true;
13
            }
14
        }
15
        return false;
16
    }
17
18
    private function getKeysFromData($array)
19
    {