TenantTokenVerificationResult   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 35
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isTenant() 0 3 1
A __construct() 0 7 1
A setIsTenant() 0 3 1
1
<?php
2
3
namespace JincorTech\AuthClient;
4
5
use JincorTech\AuthClient\Abstracts\VerificationResult;
6
7
/**
8
 * Class TenantTokenVerificationResult.
9
 */
10
class TenantTokenVerificationResult extends VerificationResult
11
{
12
    /**
13
     * @var bool
14
     */
15
    private $isTenant;
16
17
    /**
18
     * TenantTokenVerificationResult constructor.
19
     *
20
     * @param array $params
21
     */
22
    public function __construct(array $params)
23
    {
24
        parent::__construct($params);
25
26
        $this->validateParams($params, ['isTenant']);
27
28
        $this->setIsTenant($params['isTenant']);
29
    }
30
31
    /**
32
     * @return bool
33
     */
34
    public function isTenant(): bool
35
    {
36
        return $this->isTenant;
37
    }
38
39
    /**
40
     * @param bool $isTenant
41
     */
42
    private function setIsTenant(bool $isTenant)
43
    {
44
        $this->isTenant = $isTenant;
45
    }
46
}
47