Option   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 4
c 3
b 1
f 0
lcom 1
cbo 0
dl 0
loc 54
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A has() 0 4 1
A all() 0 4 1
A set() 0 4 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
}