Code Duplication    Length = 11-11 lines in 2 locations

Serialize/class.Serializer.php 1 location

@@ 8-18 (lines=11) @@
5
{
6
    protected $types;
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

Serialize/class.XMLSerializer.php 1 location

@@ 8-18 (lines=11) @@
5
{
6
    private $types = array('xml', 'application/xml', 'text/xml');
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
    {