Passed
Push — master ( 16b30f...f79ab4 )
by Radu
01:14
created

ClientsCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A generateAuthenticationToken() 0 5 1
1
<?php
2
namespace ParcelValue\ApiClient\Domain\Clients;
3
4
final class ClientsCommand extends \ParcelValue\ApiClient\AbstractController
5
{
6
    public function __construct()
7
    {
8
        parent::__construct();
9
10
        $this->repository = new ClientsRepository($this->outputLoader);
11
    }
12
13
    public function generateAuthenticationToken($clientId, $clientKey, $serverKey)
14
    {
15
        $jwt = \ParcelValue\Api\AuthenticationToken::generate($clientId, $clientKey, $serverKey);
16
        $this->outputCli($jwt, true);
17
        return new \WebServCo\Framework\CliResponse('', true);
18
    }
19
}
20