Code Duplication    Length = 13-13 lines in 2 locations

htdocs/src/Oc/Menu/Renderer/MainRenderer.php 2 locations

@@ 232-244 (lines=13) @@
229
        return $this->format($text, 'link', $item->getLevel(), $options);
230
    }
231
232
    protected function renderLinkElement(ItemInterface $item, array $options)
233
    {
234
        $childrenClass = (array) $item->getChildrenAttribute('class');
235
236
        if ($options['linkClass']) {
237
            $childrenClass[] = $options['linkClass'];
238
        }
239
240
        $childrenAttributes = $item->getChildrenAttributes();
241
        $childrenAttributes['class'] = implode(' ', $childrenClass);
242
243
        return sprintf('<a href="%s"%s>%s</a>', $this->escape($item->getUri()), $this->renderHtmlAttributes($childrenAttributes), $this->renderLabel($item, $options));
244
    }
245
246
    protected function renderSpanElement(ItemInterface $item, array $options)
247
    {
@@ 246-258 (lines=13) @@
243
        return sprintf('<a href="%s"%s>%s</a>', $this->escape($item->getUri()), $this->renderHtmlAttributes($childrenAttributes), $this->renderLabel($item, $options));
244
    }
245
246
    protected function renderSpanElement(ItemInterface $item, array $options)
247
    {
248
        $childrenClass = (array) $item->getChildrenAttribute('class');
249
250
        if ($options['textClass']) {
251
            $childrenClass[] = $options['textClass'];
252
        }
253
254
        $childrenAttributes = $item->getChildrenAttributes();
255
        $childrenAttributes['class'] = implode(' ', $childrenClass);
256
257
        return sprintf('<span%s>%s</span>', $this->renderHtmlAttributes($childrenAttributes), $this->renderLabel($item, $options));
258
    }
259
260
    protected function renderLabel(ItemInterface $item, array $options)
261
    {