Completed
Push — master ( 349a1f...8ae7aa )
by Ashley
07:19
created

DoormanManager   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 27
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\UuidDriver;
7
use Illuminate\Foundation\Application;
8
use Illuminate\Support\Manager;
9
10
/**
11
 * Class DoormanManager
12
 *
13
 * @package Clarkeash\Doorman
14
 * @method string code()
15
 */
16
class DoormanManager extends Manager
17
{
18
    public function __construct(Application $application)
19
    {
20
        parent::__construct($application);
21
    }
22
23
    /**
24
     * Get the default driver name.
25
     *
26
     * @return string
27
     */
28
    public function getDefaultDriver()
29
    {
30
        return $this->app['config']['doorman.driver'];
31
    }
32
33
    public function createBasicDriver()
34
    {
35
        return new BasicDriver;
36
    }
37
38
    public function createUuidDriver()
39
    {
40
        return new UuidDriver;
41
    }
42
}
43