Completed
Push — master ( 4f3de5...9b9e7a )
by Pavel
05:51
created

AclServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 10 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\Common\Acl;
6
use Pimple\Container;
7
8
final class AclServiceProvider extends BaseServiceProvider
9
{
10
    /**
11
     * Register ACL service provider.
12
     *
13
     * @param Container $container
14
     */
15
    public function register(Container $container)
16
    {
17
        $config = $container['settings']['acl'];
18
19
        $container['acl'] = function (Container $c) use ($config) {
0 ignored issues
show
Unused Code introduced by
The parameter $c is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Comprehensibility introduced by
Avoid variables with short names like $c. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
20
            $acl = new Acl($config);
21
22
            return $acl;
23
        };
24
    }
25
}
26