Test Failed
Pull Request — master (#2143)
by Janko
33:22 queued 22:15
created

UserRegistration::getReferer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Orm\Entity;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Doctrine\ORM\Mapping\Entity;
9
use Doctrine\ORM\Mapping\Id;
10
use Doctrine\ORM\Mapping\JoinColumn;
11
use Doctrine\ORM\Mapping\OneToOne;
12
use Doctrine\ORM\Mapping\Table;
13
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
15
#[Table(name: 'stu_user_registration')]
16
#[Entity]
17
class UserRegistration implements UserRegistrationInterface
18
{
19
    #[Id]
20
    #[OneToOne(targetEntity: 'User', inversedBy: 'registration')]
21
    #[JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
22
    private UserInterface $user;
23
24
    #[Column(type: 'string', length: 20)]
25
    private string $login = '';
26
27
    #[Column(type: 'string', length: 255)]
28
    private string $pass = '';
29
30
    #[Column(type: 'string', length: 6, nullable: true)]
31
    private ?string $sms_code = null;
32
33
    #[Column(type: 'string', length: 200)]
34
    private string $email = '';
35
36
    #[Column(type: 'string', length: 255, nullable: true)]
37
    private ?string $mobile = null;
38
39
    #[Column(type: 'integer')]
40
    private int $creation = 0;
41
42
    #[Column(type: 'smallint')]
43
    private int $delmark = 0;
44
45
    #[Column(type: 'string', length: 255)]
46
    private string $password_token = '';
47
48
    #[Column(type: 'integer', nullable: true, options: ['default' => 1])]
49
    private ?int $sms_sended = 1;
50
51
    #[Column(type: 'string', length: 6, nullable: true)]
52
    private ?string $email_code = null;
53
54
    #[OneToOne(targetEntity: 'UserReferer', mappedBy: 'userRegistration')]
55
    private ?UserRefererInterface $referer = null;
56
57
    public function __construct(UserInterface $user)
58
    {
59
        $this->user = $user;
60
    }
61
62
    #[Override]
63
    public function getLogin(): string
64
    {
65
        return $this->login;
66
    }
67
68
    #[Override]
69
    public function setLogin(string $login): UserRegistrationInterface
70
    {
71
        $this->login = $login;
72
        return $this;
73
    }
74
75
    #[Override]
76
    public function getPassword(): string
77
    {
78
        return $this->pass;
79
    }
80
81
    #[Override]
82
    public function setPassword(string $password): UserRegistrationInterface
83
    {
84
        $this->pass = $password;
85
        return $this;
86
    }
87
88
    #[Override]
89
    public function getSmsCode(): ?string
90
    {
91
        return $this->sms_code;
92
    }
93
94
    #[Override]
95
    public function setSmsCode(?string $code): UserRegistrationInterface
96
    {
97
        $this->sms_code = $code;
98
        return $this;
99
    }
100
101
    #[Override]
102
    public function getEmail(): string
103
    {
104
        return $this->email;
105
    }
106
107
    #[Override]
108
    public function setEmail(string $email): UserRegistrationInterface
109
    {
110
        $this->email = $email;
111
        return $this;
112
    }
113
114
    #[Override]
115
    public function getMobile(): ?string
116
    {
117
        return $this->mobile;
118
    }
119
120
    #[Override]
121
    public function setMobile(?string $mobile): UserRegistrationInterface
122
    {
123
        $this->mobile = $mobile;
124
        return $this;
125
    }
126
127
    #[Override]
128
    public function getCreationDate(): int
129
    {
130
        return $this->creation;
131
    }
132
133
    #[Override]
134
    public function setCreationDate(int $creationDate): UserRegistrationInterface
135
    {
136
        $this->creation = $creationDate;
137
        return $this;
138
    }
139
140
    #[Override]
141
    public function getDeletionMark(): int
142
    {
143
        return $this->delmark;
144
    }
145
146
    #[Override]
147
    public function setDeletionMark(int $deletionMark): UserRegistrationInterface
148
    {
149
        $this->delmark = $deletionMark;
150
        return $this;
151
    }
152
153
    #[Override]
154
    public function getPasswordToken(): string
155
    {
156
        return $this->password_token;
157
    }
158
159
    #[Override]
160
    public function setPasswordToken(string $password_token): UserRegistrationInterface
161
    {
162
        $this->password_token = $password_token;
163
        return $this;
164
    }
165
166
    #[Override]
167
    public function getReferer(): ?UserRefererInterface
168
    {
169
        return $this->referer;
170
    }
171
172
    #[Override]
173
    public function setReferer(?UserRefererInterface $referer): UserRegistrationInterface
174
    {
175
        $this->referer = $referer;
176
        return $this;
177
    }
178
179
    #[Override]
180
    public function getSmsSended(): int
181
    {
182
        return $this->sms_sended ?? 1;
183
    }
184
185
    #[Override]
186
    public function setSmsSended(int $smsSended): UserRegistrationInterface
187
    {
188
        $this->sms_sended = $smsSended;
189
        return $this;
190
    }
191
192
    #[Override]
193
    public function getEmailCode(): ?string
194
    {
195
        return $this->email_code;
196
    }
197
198
    #[Override]
199
    public function setEmailCode(?string $emailCode): UserRegistrationInterface
200
    {
201
        $this->email_code = $emailCode;
202
        return $this;
203
    }
204
}
205