Code Duplication    Length = 8-8 lines in 3 locations

Composers/ApplicationVersionViewComposer.php 1 location

@@ 40-47 (lines=8) @@
37
        $view->with('version', $this->getAppVersion());
38
    }
39
40
    private function onBackend()
41
    {
42
        $url = $this->request->url();
43
        if (str_contains($url, config('asgard.core.core.admin-prefix'))) {
44
            return true;
45
        }
46
47
        return false;
48
    }
49
50
    /**

Providers/SidebarServiceProvider.php 1 location

@@ 31-38 (lines=8) @@
28
        }
29
    }
30
31
    private function onBackend()
32
    {
33
        $url = $this->request->url();
34
        if (str_contains($url, config('asgard.core.core.admin-prefix'))) {
35
            return true;
36
        }
37
38
        return false;
39
    }
40
}
41

Composers/AssetsViewComposer.php 1 location

@@ 48-55 (lines=8) @@
45
        $view->with('jsFiles', $this->assetPipeline->allJs());
46
    }
47
48
    private function onBackend()
49
    {
50
        $url = $this->request->url();
51
        if (str_contains($url, config('asgard.core.core.admin-prefix'))) {
52
            return true;
53
        }
54
55
        return false;
56
    }
57
}
58