Factory::createHmacDriver()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 9.4285
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