Password::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * File:Password.php
6
 *
7
 * @author Maciej Sławik <[email protected]>
8
 * @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl)
9
 */
10
11
namespace LizardMedia\PasswordMigrator\Model\Data;
12
13
use LizardMedia\PasswordMigrator\Api\Data\PasswordInterface;
14
15
/**
16
 * Class Password
17
 * @package LizardMedia\PasswordMigrator\Model\Data
18
 */
19
class Password implements PasswordInterface
20
{
21
    /**
22
     * @var int
23
     */
24
    private $id;
25
26
    /**
27
     * @var int
28
     */
29
    private $customerId;
30
31
    /**
32
     * @var string
33
     */
34
    private $password;
35
36
    /**
37
     * @var string
38
     */
39
    private $salt;
40
41
    /**
42
     * @var string
43
     */
44
    private $createdAt;
45
46
    /**
47
     * Password constructor.
48
     * @param int $customerId
49
     * @param int $id
50
     */
51
    public function __construct(int $customerId, int $id = 0)
52
    {
53
        $this->customerId = $customerId;
54
        $this->id = $id;
55
    }
56
57
    /**
58
     * @return int
59
     */
60
    public function getId(): int
61
    {
62
        return $this->id;
63
    }
64
65
    /**
66
     * @return int
67
     */
68
    public function getCustomerId(): int
69
    {
70
        return $this->customerId;
71
    }
72
73
    /**
74
     * @return string
75
     */
76
    public function getPassword(): string
77
    {
78
        return $this->password;
79
    }
80
81
    /**
82
     * @param string $password
83
     * @return void
84
     */
85
    public function setPassword(string $password): void
86
    {
87
        $this->password = $password;
88
    }
89
90
    /**
91
     * @return string
92
     */
93
    public function getSalt(): string
94
    {
95
        return $this->salt;
96
    }
97
98
    /**
99
     * @param string $salt
100
     * @return void
101
     */
102
    public function setSalt(string $salt): void
103
    {
104
        $this->salt = $salt;
105
    }
106
107
    /**
108
     * @return string
109
     */
110
    public function getCreatedAt(): string
111
    {
112
        return $this->createdAt;
113
    }
114
115
    /**
116
     * @param string $createdAt
117
     * @return void
118
     */
119
    public function setCreatedAt(string $createdAt): void
120
    {
121
        $this->createdAt = $createdAt;
122
    }
123
}
124