Account::isDeactivated()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the LetsEncrypt ACME client.
7
 *
8
 * @author    Ivanov Aleksandr <[email protected]>
9
 * @copyright 2019-2020
10
 * @license   https://github.com/misantron/letsencrypt-client/blob/master/LICENSE MIT License
11
 */
12
13
namespace LetsEncrypt\Entity;
14
15
final class Account extends Entity
16
{
17
    use UrlAwareTrait;
18
19
    private const STATUS_DEACTIVATED = 'deactivated';
20
21
    public $id;
22
23
    /**
24
     * @var array
25
     */
26
    public $key;
27
28
    /**
29
     * @var array
30
     */
31
    public $contact;
32
33
    public $agreement;
34
35
    /**
36
     * @var string
37
     */
38
    public $initialIp;
39
40
    /**
41
     * @var string
42
     */
43
    public $createdAt;
44
45
    /**
46
     * @var string
47
     */
48
    private $keyPath;
49
50
    public function __construct(array $data, string $url, string $keyPath)
51
    {
52
        parent::__construct($data);
53
54
        $this->url = $url;
55
        $this->keyPath = $keyPath;
56
    }
57
58
    public function getPrivateKeyPath(): string
59
    {
60
        return $this->keyPath;
61
    }
62
63
    public function isDeactivated(): bool
64
    {
65
        return $this->status === self::STATUS_DEACTIVATED;
66
    }
67
}
68