DoormanManager   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 3
dl 0
loc 33
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDefaultDriver() 0 4 1
A createBasicDriver() 0 4 1
A createUuidDriver() 0 4 1
1
<?php
2
3
namespace Clarkeash\Doorman;
4
5
use Clarkeash\Doorman\Drivers\BasicDriver;
6
use Clarkeash\Doorman\Drivers\DriverInterface;
7
use Clarkeash\Doorman\Drivers\UuidDriver;
8
use Illuminate\Foundation\Application;
9
use Illuminate\Support\Manager;
10
11
/**
12
 * Class DoormanManager
13
 *
14
 * @package Clarkeash\Doorman
15
 * @method string code()
16
 */
17
class DoormanManager extends Manager
18
{
19 20
    public function __construct(Application $application)
20
    {
21 20
        parent::__construct($application);
22 20
    }
23
24
    /**
25
     * Get the default driver name.
26
     *
27
     * @return DriverInterface
28
     */
29 16
    public function getDefaultDriver()
30
    {
31 16
        return $this->container['config']['doorman.driver'];
32
    }
33
34
    /**
35
     * @return BasicDriver
36
     */
37 16
    public function createBasicDriver()
38
    {
39 16
        return new BasicDriver;
40
    }
41
42
    /**
43
     * @return UuidDriver
44
     */
45 1
    public function createUuidDriver()
46
    {
47 1
        return new UuidDriver;
48
    }
49
}
50