Issues (148)

src/Proxy/Acl.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\Acl\Acl as Instance;
15
16
/**
17
 * Proxy to Acl
18
 *
19
 * Example of usage
20
 *     use Bluz\Proxy\Acl;
21
 *
22
 *     if (!Acl::isAllowed('users', 'profile')) {
23
 *          throw new Exception('You do not have permission to access user profiles');
24
 *     }
25
 *
26
 * @package  Bluz\Proxy
27
 * @author   Anton Shevchuk
28
 *
29
 * @method   static Instance getInstance()
30
 *
31
 * @method   static bool isAllowed($module, $privilege)
32
 * @see      Instance::isAllowed()
33
 */
34
final class Acl
35
{
36
    use ProxyTrait;
37
38
    /**
39
     * Init instance
40
     *
41
     * @return Instance
42
     */
43 28
    private static function initInstance(): Instance
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...
44
    {
45 28
        return new Instance();
46
    }
47
}
48