Auth   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A initInstance() 0 5 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\Auth\Auth as Instance;
15
use Bluz\Auth\IdentityInterface;
16
17
/**
18
 * Proxy to Auth
19
 *
20
 * Example of usage
21
 *     use Bluz\Proxy\Auth;
22
 *
23
 *     $user = Auth::getIdentity();
24
 *
25
 * @package  Bluz\Proxy
26
 * @author   Anton Shevchuk
27
 *
28
 * @method   static Instance getInstance()
29
 *
30
 * @method   static void setIdentity(IdentityInterface $identity)
31
 * @see      Instance::setIdentity()
32
 *
33
 * @method   static IdentityInterface getIdentity()
34
 * @see      Instance::getIdentity()
35
 *
36
 * @method   static void clearIdentity()
37
 * @see      Instance::clearIdentity()
38
 */
39
final class Auth
40
{
41
    use ProxyTrait;
42
43
    /**
44
     * Init instance
45
     *
46
     * @return Instance
47
     */
48 8
    private static function initInstance(): Instance
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...
49
    {
50 8
        $instance = new Instance();
51 8
        $instance->setOptions(Config::get('auth'));
52 8
        return $instance;
53
    }
54
}
55