Code Duplication    Length = 13-13 lines in 2 locations

module/Core/src/View/Helper/ContactLink.php 1 location

@@ 64-76 (lines=13) @@
61
        }
62
    }
63
    
64
    protected function createAttributesString(array $attributes)
65
    {
66
        $renderer   = $this->getView();
67
        $escape     = $renderer->plugin('escapehtml');
68
        $escapeAttr = $renderer->plugin('escapehtmlattr');
69
        $attr       = array();
70
        
71
        foreach ($attributes as $name => $value) {
72
            $attr[] = $escape($name) . (strlen($value) ? ('="' . $escapeAttr($value) . '"') : '');
73
        }
74
        
75
        return implode(' ', $attr);
76
    }
77
}
78

module/Core/src/View/Helper/Link.php 1 location

@@ 66-78 (lines=13) @@
63
        return sprintf('<a %s href="%s">%s</a>', $attributesStr, $urlOrEmail, $label);
64
    }
65
    
66
    protected function createAttributesString(array $attributes)
67
    {
68
        $renderer   = $this->getView();
69
        $escape     = $renderer->plugin('escapehtml');
70
        $escapeAttr = $renderer->plugin('escapehtmlattr');
71
        $attr       = array();
72
        
73
        foreach ($attributes as $name => $value) {
74
            $attr[] = $escape($name) . '="' . $escapeAttr($value) . '"';
75
        }
76
        
77
        return implode(' ', $attr);
78
    }
79
}
80