Option::all()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php namespace Mascame\Artificer\Options;
2
3
use Config;
4
5
class Option
6
{
7
8
    /**
9
     * @var
10
     */
11
    public $options;
12
13
	/**
14
	 * @var string
15
	 */
16
	public static $config_path = '';
17
18
    /**
19
     * @var null
20
     */
21
    public static $subkey = null;
22
23
    /**
24
     * @param string $key
25
     * @return mixed
26
     */
27
    public static function get($key = '')
28
    {
29
        return Config::get(self::$config_path . $key);
30
    }
31
32
    /**
33
     * @param string $key
34
     * @return bool
35
     */
36
    public static function has($key = '')
37
    {
38
        return Config::has(self::$config_path . $key);
39
    }
40
41
    /**
42
     * @param null $key
43
     * @return mixed
44
     */
45
    public static function all($key = null)
46
    {
47
        return Option::get(self::$config_path . $key);
48
    }
49
50
    /**
51
     * @param $key
52
     * @param $value
53
     */
54
    public static function set($key, $value)
55
    {
56
        Config::set(self::$config_path . $key, $value);
57
    }
58
}