Code Duplication    Length = 5-5 lines in 2 locations

src/View/ViewComposer.php 2 locations

@@ 263-267 (lines=5) @@
260
         * If the view uses a dot syntax namespace then
261
         * transform it all into the override view path.
262
         */
263
        if ($addon = $this->addons->get($namespace)) {
264
            $override = $this->theme->getNamespace(
265
                "addons/{$addon->getVendor()}/{$addon->getSlug()}-{$addon->getType()}/" . $path
266
            );
267
        }
268
269
        if ($this->view->exists($override)) {
270
            return $override;
@@ 290-294 (lines=5) @@
287
         *
288
         * @deprecated since v3.0.0
289
         */
290
        if ($addon) {
291
            $override = $this->theme->getNamespace(
292
                "addon/{$addon->getVendor()}/{$addon->getSlug()}-{$addon->getType()}/" . $path
293
            );
294
        }
295
296
        if ($this->view->exists($override)) {
297
            return $override;