Code Duplication    Length = 11-11 lines in 3 locations

src/Form/Tools.php 1 location

@@ 136-146 (lines=11) @@
133
            $this->add($this->backButton());
134
        }
135
136
        return $this->tools->map(function ($tool) {
137
            if ($tool instanceof Renderable) {
138
                return $tool->render();
139
            }
140
141
            if ($tool instanceof Htmlable) {
142
                return $tool->toHtml();
143
            }
144
145
            return (string) $tool;
146
        })->implode(' ');
147
    }
148
}
149

src/Tree/Tools.php 1 location

@@ 58-68 (lines=11) @@
55
     */
56
    public function render()
57
    {
58
        return $this->tools->map(function ($tool) {
59
            if ($tool instanceof Renderable) {
60
                return $tool->render();
61
            }
62
63
            if ($tool instanceof Htmlable) {
64
                return $tool->toHtml();
65
            }
66
67
            return (string) $tool;
68
        })->implode(' ');
69
    }
70
}
71

src/Widgets/Navbar.php 1 location

@@ 73-83 (lines=11) @@
70
            return '';
71
        }
72
73
        return $this->elements[$part]->map(function ($element) {
74
            if ($element instanceof Htmlable) {
75
                return $element->toHtml();
76
            }
77
78
            if ($element instanceof Renderable) {
79
                return $element->render();
80
            }
81
82
            return (string) $element;
83
        })->implode('');
84
    }
85
}
86