Completed
Push — master ( e2430d...09e7b1 )
by ARCANEDEV
05:35
created

AuthorizationServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
ccs 0
cts 6
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A defineMany() 0 6 2
1
<?php namespace Arcanedev\Support\Providers;
2
3
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
4
5
/**
6
 * Class     AuthorizationServiceProvider
7
 *
8
 * @package  Arcanedev\Support\Providers
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class AuthorizationServiceProvider extends ServiceProvider
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Main Functions
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Define policies.
19
     *
20
     * @param  \Illuminate\Contracts\Auth\Access\Gate  $gate
21
     * @param  string                                  $class
22
     * @param  array                                   $policies
23
     */
24
    protected function defineMany($gate, $class, array $policies)
25
    {
26
        foreach ($policies as $method => $ability) {
27
            $gate->define($ability, "$class@$method");
28
        }
29
    }
30
}
31