DomainAddResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: marcelwege
5
 * Date: 23.11.17
6
 * Time: 18:13.
7
 */
8
9
namespace App\Siweocs\Models;
10
11
use App\Domain;
12
13
/**
14
 * Class DomainAddResponse.
15
 */
16
class DomainAddResponse extends SiwecosBaseReponse
17
{
18
    /**
19
     * @var string
20
     */
21
    public $message;
22
23
    /**
24
     * @var bool
25
     */
26
    public $verificationStatus;
27
28
    /**
29
     * @var int
30
     */
31
    public $domainId;
32
33
    /**
34
     * @var string
35
     */
36
    public $domainToken;
37
38
    public function __construct(Domain $databaseDomain)
39
    {
40
        parent::__construct('Domain was created');
41
        $this->domainId = $databaseDomain->id;
42
        $this->verificationStatus = (bool) $databaseDomain->verified;
43
        $this->domainToken = $databaseDomain->domain_token;
44
    }
45
}
46