Factory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultDriver() 0 4 1
A createHmacDriver() 0 7 1
1
<?php
2
3
namespace Framgia\Jwt\Signers;
4
5
use Illuminate\Support\Manager;
6
7
class Factory extends Manager
8
{
9
    public function getDefaultDriver()
10
    {
11
        return $this->app['config']['jwt.signer.default'];
12
    }
13
14
    protected function createHmacDriver()
15
    {
16
        $key = $this->app['config']['jwt.secret'];
17
        $algorithm = $this->app['config']['jwt.signer.hmac.algorithm'];
18
19
        return new Hmac($key, $algorithm);
20
    }
21
}
22