TokenStatusResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: marcelwege
5
 * Date: 23.11.17
6
 * Time: 14:49.
7
 */
8
9
namespace App\Siweocs\Models;
10
11
use App\Token;
12
13
class TokenStatusResponse extends SiwecosBaseReponse
14
{
15
    /**
16
     * @var int
17
     */
18
    public $credits;
19
20
    /**
21
     * @var int
22
     */
23
    public $aclLevel;
24
25
    /**
26
     * @var bool
27
     */
28
    public $active;
29
30
    public function __construct(Token $databaseToken)
31
    {
32
        parent::__construct('current state of requested token');
33
        $this->active = $databaseToken->active;
34
        $this->aclLevel = $databaseToken->acl_level;
35
        $this->credits = $databaseToken->credits;
36
    }
37
}
38