Config   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 12
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A initInstance() 0 3 1
1
<?php
2
3
/**
4
 * Bluz Framework Component
5
 *
6
 * @copyright Bluz PHP Team
7
 * @link      https://github.com/bluzphp/framework
8
 */
9
10
declare(strict_types=1);
11
12
namespace Bluz\Proxy;
13
14
use Bluz\Common\Exception\ComponentException;
15
use Bluz\Config\Config as Instance;
16
17
/**
18
 * Proxy to Config
19
 *
20
 * Example of usage
21
 * <code>
22
 *     use Bluz\Proxy\Config;
23
 *
24
 *     if (!Config::get('db')) {
25
 *          throw new Exception('Configuration for `db` is missed');
26
 *     }
27
 * </code>
28
 *
29
 * @package  Bluz\Proxy
30
 * @author   Anton Shevchuk
31
 *
32
 * @method   static Instance getInstance()
33
 *
34
 * @method   static mixed get(...$keys)
35
 * @see      Instance::get()
36
 */
37
final class Config
38
{
39
    use ProxyTrait;
40
41
    /**
42
     * Init instance
43
     *
44
     * @throws ComponentException
45
     */
46
    private static function initInstance()
0 ignored issues
show
Unused Code introduced by
The method initInstance() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
47
    {
48
        throw new ComponentException('Class `Proxy\\Config` required external initialization');
49
    }
50
}
51