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
|
|||
49 | { |
||
50 | 8 | $instance = new Instance(); |
|
51 | 8 | $instance->setOptions(Config::get('auth')); |
|
52 | 8 | return $instance; |
|
53 | } |
||
54 | } |
||
55 |
This check looks for private methods that have been defined, but are not used inside the class.