Code Duplication    Length = 11-11 lines in 4 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
    {

src/component/Html/Breadcrumbs.php 1 location

@@ 185-195 (lines=11) @@
182
     *
183
     * @return string
184
     */
185
    private function isAttribute($attribute, $value)
186
    {
187
        if (is_array($value)) {
188
            array_filter($value);
189
            $value = trim(implode(' ', $value));
190
191
            return !empty($value) ? ' '.$attribute.'="'.$value.'"' : '';
192
        }
193
194
        return (isset($value) and !empty($value)) ? ' '.$attribute.'="'.trim($value).'"' : '';
195
    }
196
}
197

src/component/Html/Paging.php 1 location

@@ 104-114 (lines=11) @@
101
     *
102
     * @return string
103
     */
104
    private function isAttribute($attribute, $value)
105
    {
106
        if (is_array($value)) {
107
            array_filter($value);
108
            $value = trim(implode(' ', $value));
109
110
            return !empty($value) ? ' '.$attribute.'="'.$value.'"' : '';
111
        }
112
113
        return (isset($value) and !empty($value)) ? ' '.$attribute.'="'.trim($value).'"' : '';
114
    }
115
116
    public function create()
117
    {