GenerateTokenFromClaimsTask::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace App\Containers\Authentication\Tasks;
4
5
use App\Containers\Authentication\Adapters\JwtAuthAdapter;
6
use App\Ship\Parents\Tasks\Task;
7
8
/**
9
 * Class GenerateTokenFromClaimsTask.
10
 *
11
 * @author Mahmoud Zalt <[email protected]>
12
 */
13
class GenerateTokenFromClaimsTask extends Task
14
{
15
16
    public $jwtAuthAdapter;
17
18
    /**
19
     * GenerateTokenFromClaimsTask constructor.
20
     *
21
     * @param \App\Containers\Authentication\Adapters\JwtAuthAdapter $jwtAuthAdapter
22
     */
23
    public function __construct(JwtAuthAdapter $jwtAuthAdapter)
24
    {
25
        $this->jwtAuthAdapter = $jwtAuthAdapter;
26
    }
27
28
29
    /**
30
     * @param $customClaims
31
     *
32
     * @return  mixed
33
     */
34
    public function run($customClaims)
35
    {
36
        return $this->jwtAuthAdapter->makeTokenWithCustomClaims($customClaims);
37
    }
38
39
}
40