Completed
Push — master ( d15a66...4f59a4 )
by ARCANEDEV
03:38
created

RouteServiceProvider::getAdminRouteGroup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php namespace Arcanesoft\Core\Bases;
2
3
use Arcanedev\Support\Providers\RouteServiceProvider as ServiceProvider;
4
use Illuminate\Support\Arr;
5
6
/**
7
 * Class     RouteServiceProvider
8
 *
9
 * @package  Arcanesoft\Support\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 *
12
 * @todo: Remove deprecated functions
13
 */
14
abstract class RouteServiceProvider extends ServiceProvider
15
{
16
    /* ------------------------------------------------------------------------------------------------
17
     |  Getters & Setters
18
     | ------------------------------------------------------------------------------------------------
19
     */
20
    /**
21
     * Get Foundation route group.
22
     *
23
     * @return array
24
     */
25
    protected function getAdminRouteGroup()
26
    {
27
        return $this->config()->get('arcanesoft.foundation.route', []);
28
    }
29
30
    /**
31
     * Get Foundation route prefix.
32
     *
33
     * @return string
34
     */
35
    protected function getAdminPrefix()
36
    {
37
        return Arr::get($this->getFoundationRouteGroup(), 'prefix', 'dashboard');
0 ignored issues
show
Deprecated Code introduced by
The method Arcanesoft\Core\Bases\Ro...tFoundationRouteGroup() has been deprecated.

This method has been deprecated.

Loading history...
38
    }
39
40
    /* ------------------------------------------------------------------------------------------------
41
     |  Other Functions
42
     | ------------------------------------------------------------------------------------------------
43
     */
44
    /**
45
     * Get the config repository instance.
46
     *
47
     * @return \Illuminate\Contracts\Config\Repository
48
     */
49
    protected function config()
50
    {
51
        return $this->app['config'];
52
    }
53
54
    /* ------------------------------------------------------------------------------------------------
55
     |  Deprecated Functions
56
     | ------------------------------------------------------------------------------------------------
57
     */
58
    /**
59
     * Get Foundation route group.
60
     *
61
     * @deprecated
62
     *
63
     * @return array
64
     */
65
    protected function getFoundationRouteGroup()
66
    {
67
        return $this->getAdminRouteGroup();
68
    }
69
70
    /**
71
     * Get Foundation route prefix.
72
     *
73
     * @deprecated
74
     *
75
     * @return string
76
     */
77
    protected function getFoundationPrefix()
78
    {
79
        return $this->getAdminPrefix();
80
    }
81
}
82