Completed
Push — master ( b5ad8c...a739bd )
by ARCANEDEV
06:46 queued 03:42
created

PackageServiceProvider::getConfigKey()   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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Core\Bases;
2
3
use Arcanedev\Support\PackageServiceProvider as ServiceProvider;
4
5
/**
6
 * Class     PackageServiceProvider
7
 *
8
 * @package  Arcanesoft\Core\Bases
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
abstract class PackageServiceProvider extends ServiceProvider
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Properties
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Vendor name.
19
     *
20
     * @var string
21
     */
22
    protected $vendor       = 'arcanesoft';
23
24
    /* ------------------------------------------------------------------------------------------------
25
     |  Getters & Setters
26
     | ------------------------------------------------------------------------------------------------
27
     */
28
    /**
29
     * Get config key.
30
     *
31
     * @return string
32
     */
33
    protected function getConfigKey()
34
    {
35
        return str_slug($this->vendor . ' ' .$this->package, '.');
36
    }
37
38
    /* ------------------------------------------------------------------------------------------------
39
     |  Other Functions
40
     | ------------------------------------------------------------------------------------------------
41
     */
42
    /**
43
     * Get the config repository instance.
44
     *
45
     * @return \Illuminate\Contracts\Config\Repository
46
     */
47 8
    protected function config()
48
    {
49 8
        return $this->app['config'];
50
    }
51
}
52