Issues (148)

src/Proxy/Config.php (1 issue)

Severity
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
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