Code Duplication    Length = 5-5 lines in 2 locations

src/View/ViewComposer.php 2 locations

@@ 216-220 (lines=5) @@
213
         * If the view uses a dot syntax namespace then
214
         * transform it all into the override view path.
215
         */
216
        if ($addon = $this->addons->get($namespace)) {
217
            $override = $this->theme->getNamespace(
218
                "addons/{$addon->getVendor()}/{$addon->getSlug()}-{$addon->getType()}/" . $path
219
            );
220
        }
221
222
        if ($this->view->exists($override)) {
223
            return $override;
@@ 243-247 (lines=5) @@
240
         *
241
         * @deprecated since v3.0.0
242
         */
243
        if ($addon) {
244
            $override = $this->theme->getNamespace(
245
                "addon/{$addon->getVendor()}/{$addon->getSlug()}-{$addon->getType()}/" . $path
246
            );
247
        }
248
249
        if ($this->view->exists($override)) {
250
            return $override;