Code Duplication    Length = 11-11 lines in 2 locations

src/module/Appearance/Menu/Navigation.php 1 location

@@ 147-157 (lines=11) @@
144
     *
145
     * @return string
146
     */
147
    private function isAttribute($attribute, $value)
148
    {
149
        if (is_array($value)) {
150
            array_filter($value);
151
            $value = trim(implode(' ', $value));
152
153
            return !empty($value) ? ' '.$attribute.'="'.$value.'"' : '';
154
        }
155
156
        return (isset($value) and !empty($value)) ? ' '.$attribute.'="'.trim($value).'"' : '';
157
    }
158
}
159

src/component/Html/Navigation.php 1 location

@@ 529-539 (lines=11) @@
526
     *
527
     * @return string
528
     */
529
    private function isAttribute($attribute, $value)
530
    {
531
        if (is_array($value)) {
532
            array_filter($value);
533
            $value = trim(implode(' ', $value));
534
535
            return !empty($value) ? ' '.$attribute.'="'.$value.'"' : '';
536
        }
537
538
        return (isset($value) and !empty($value)) ? ' '.$attribute.'="'.trim($value).'"' : '';
539
    }
540
541
    protected function each(&$arr)
542
    {