Skip to content

Commit f590829

Browse files
authored
Merge pull request #2719 from Soullivaneuh/phpdoc-fixes
Phpdoc fixes
2 parents c617ec7 + 568f6cd commit f590829

File tree

5 files changed

+35
-33
lines changed

5 files changed

+35
-33
lines changed

Model/GroupInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface GroupInterface
2020
/**
2121
* @param string $role
2222
*
23-
* @return self
23+
* @return static
2424
*/
2525
public function addRole($role);
2626

@@ -49,21 +49,21 @@ public function getRoles();
4949
/**
5050
* @param string $role
5151
*
52-
* @return self
52+
* @return static
5353
*/
5454
public function removeRole($role);
5555

5656
/**
5757
* @param string $name
5858
*
59-
* @return self
59+
* @return static
6060
*/
6161
public function setName($name);
6262

6363
/**
6464
* @param array $roles
6565
*
66-
* @return self
66+
* @return static
6767
*/
6868
public function setRoles(array $roles);
6969
}

Model/GroupableInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function hasGroup($name);
4646
*
4747
* @param GroupInterface $group
4848
*
49-
* @return self
49+
* @return static
5050
*/
5151
public function addGroup(GroupInterface $group);
5252

@@ -55,7 +55,7 @@ public function addGroup(GroupInterface $group);
5555
*
5656
* @param GroupInterface $group
5757
*
58-
* @return self
58+
* @return static
5959
*/
6060
public function removeGroup(GroupInterface $group);
6161
}

Model/User.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,24 @@ abstract class User implements UserInterface, GroupableInterface
7474
protected $plainPassword;
7575

7676
/**
77-
* @var \DateTime
77+
* @var \DateTime|null
7878
*/
7979
protected $lastLogin;
8080

8181
/**
8282
* Random string sent to the user email address in order to verify it.
8383
*
84-
* @var string
84+
* @var string|null
8585
*/
8686
protected $confirmationToken;
8787

8888
/**
89-
* @var \DateTime
89+
* @var \DateTime|null
9090
*/
9191
protected $passwordRequestedAt;
9292

9393
/**
94-
* @var Collection
94+
* @var GroupInterface[]|Collection
9595
*/
9696
protected $groups;
9797

@@ -247,7 +247,7 @@ public function getPlainPassword()
247247
/**
248248
* Gets the last login time.
249249
*
250-
* @return \DateTime
250+
* @return \DateTime|null
251251
*/
252252
public function getLastLogin()
253253
{

Model/UserInterface.php

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getId();
3535
*
3636
* @param string $username
3737
*
38-
* @return self
38+
* @return static
3939
*/
4040
public function setUsername($username);
4141

@@ -51,12 +51,14 @@ public function getUsernameCanonical();
5151
*
5252
* @param string $usernameCanonical
5353
*
54-
* @return self
54+
* @return static
5555
*/
5656
public function setUsernameCanonical($usernameCanonical);
5757

5858
/**
5959
* @param string|null $salt
60+
*
61+
* @return static
6062
*/
6163
public function setSalt($salt);
6264

@@ -72,7 +74,7 @@ public function getEmail();
7274
*
7375
* @param string $email
7476
*
75-
* @return self
77+
* @return static
7678
*/
7779
public function setEmail($email);
7880

@@ -88,7 +90,7 @@ public function getEmailCanonical();
8890
*
8991
* @param string $emailCanonical
9092
*
91-
* @return self
93+
* @return static
9294
*/
9395
public function setEmailCanonical($emailCanonical);
9496

@@ -104,7 +106,7 @@ public function getPlainPassword();
104106
*
105107
* @param string $password
106108
*
107-
* @return self
109+
* @return static
108110
*/
109111
public function setPlainPassword($password);
110112

@@ -113,7 +115,7 @@ public function setPlainPassword($password);
113115
*
114116
* @param string $password
115117
*
116-
* @return self
118+
* @return static
117119
*/
118120
public function setPassword($password);
119121

@@ -127,7 +129,7 @@ public function isSuperAdmin();
127129
/**
128130
* @param bool $boolean
129131
*
130-
* @return self
132+
* @return static
131133
*/
132134
public function setEnabled($boolean);
133135

@@ -136,23 +138,23 @@ public function setEnabled($boolean);
136138
*
137139
* @param bool $boolean
138140
*
139-
* @return self
141+
* @return static
140142
*/
141143
public function setSuperAdmin($boolean);
142144

143145
/**
144146
* Gets the confirmation token.
145147
*
146-
* @return string
148+
* @return string|null
147149
*/
148150
public function getConfirmationToken();
149151

150152
/**
151153
* Sets the confirmation token.
152154
*
153-
* @param string $confirmationToken
155+
* @param string|null $confirmationToken
154156
*
155-
* @return self
157+
* @return static
156158
*/
157159
public function setConfirmationToken($confirmationToken);
158160

@@ -161,7 +163,7 @@ public function setConfirmationToken($confirmationToken);
161163
*
162164
* @param null|\DateTime $date
163165
*
164-
* @return self
166+
* @return static
165167
*/
166168
public function setPasswordRequestedAt(\DateTime $date = null);
167169

@@ -177,9 +179,9 @@ public function isPasswordRequestNonExpired($ttl);
177179
/**
178180
* Sets the last login time.
179181
*
180-
* @param \DateTime $time
182+
* @param \DateTime|null $time
181183
*
182-
* @return self
184+
* @return static
183185
*/
184186
public function setLastLogin(\DateTime $time = null);
185187

@@ -204,7 +206,7 @@ public function hasRole($role);
204206
*
205207
* @param array $roles
206208
*
207-
* @return self
209+
* @return static
208210
*/
209211
public function setRoles(array $roles);
210212

@@ -213,7 +215,7 @@ public function setRoles(array $roles);
213215
*
214216
* @param string $role
215217
*
216-
* @return self
218+
* @return static
217219
*/
218220
public function addRole($role);
219221

@@ -222,7 +224,7 @@ public function addRole($role);
222224
*
223225
* @param string $role
224226
*
225-
* @return self
227+
* @return static
226228
*/
227229
public function removeRole($role);
228230
}

Model/UserManagerInterface.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function deleteUser(UserInterface $user);
4545
*
4646
* @param array $criteria
4747
*
48-
* @return UserInterface
48+
* @return UserInterface|null
4949
*/
5050
public function findUserBy(array $criteria);
5151

@@ -54,7 +54,7 @@ public function findUserBy(array $criteria);
5454
*
5555
* @param string $username
5656
*
57-
* @return UserInterface or null if user does not exist
57+
* @return UserInterface|null
5858
*/
5959
public function findUserByUsername($username);
6060

@@ -63,7 +63,7 @@ public function findUserByUsername($username);
6363
*
6464
* @param string $email
6565
*
66-
* @return UserInterface or null if user does not exist
66+
* @return UserInterface|null
6767
*/
6868
public function findUserByEmail($email);
6969

@@ -72,7 +72,7 @@ public function findUserByEmail($email);
7272
*
7373
* @param string $usernameOrEmail
7474
*
75-
* @return UserInterface or null if user does not exist
75+
* @return UserInterface|null
7676
*/
7777
public function findUserByUsernameOrEmail($usernameOrEmail);
7878

@@ -81,7 +81,7 @@ public function findUserByUsernameOrEmail($usernameOrEmail);
8181
*
8282
* @param string $token
8383
*
84-
* @return UserInterface or null if user does not exist
84+
* @return UserInterface|null
8585
*/
8686
public function findUserByConfirmationToken($token);
8787

0 commit comments

Comments
 (0)