Skip to content

Commit 454fa62

Browse files
authored
Merge pull request FriendsOfSymfony#2714 from Soullivaneuh/phpdoc-return-static
PHPDoc return type of interfaces should be static instead of self
2 parents 6731b46 + e74f337 commit 454fa62

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
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/UserInterface.php

Lines changed: 14 additions & 14 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,7 +51,7 @@ public function getUsernameCanonical();
5151
*
5252
* @param string $usernameCanonical
5353
*
54-
* @return self
54+
* @return static
5555
*/
5656
public function setUsernameCanonical($usernameCanonical);
5757

@@ -72,7 +72,7 @@ public function getEmail();
7272
*
7373
* @param string $email
7474
*
75-
* @return self
75+
* @return static
7676
*/
7777
public function setEmail($email);
7878

@@ -88,7 +88,7 @@ public function getEmailCanonical();
8888
*
8989
* @param string $emailCanonical
9090
*
91-
* @return self
91+
* @return static
9292
*/
9393
public function setEmailCanonical($emailCanonical);
9494

@@ -104,7 +104,7 @@ public function getPlainPassword();
104104
*
105105
* @param string $password
106106
*
107-
* @return self
107+
* @return static
108108
*/
109109
public function setPlainPassword($password);
110110

@@ -113,7 +113,7 @@ public function setPlainPassword($password);
113113
*
114114
* @param string $password
115115
*
116-
* @return self
116+
* @return static
117117
*/
118118
public function setPassword($password);
119119

@@ -127,7 +127,7 @@ public function isSuperAdmin();
127127
/**
128128
* @param bool $boolean
129129
*
130-
* @return self
130+
* @return static
131131
*/
132132
public function setEnabled($boolean);
133133

@@ -136,7 +136,7 @@ public function setEnabled($boolean);
136136
*
137137
* @param bool $boolean
138138
*
139-
* @return self
139+
* @return static
140140
*/
141141
public function setSuperAdmin($boolean);
142142

@@ -152,7 +152,7 @@ public function getConfirmationToken();
152152
*
153153
* @param string $confirmationToken
154154
*
155-
* @return self
155+
* @return static
156156
*/
157157
public function setConfirmationToken($confirmationToken);
158158

@@ -161,7 +161,7 @@ public function setConfirmationToken($confirmationToken);
161161
*
162162
* @param null|\DateTime $date
163163
*
164-
* @return self
164+
* @return static
165165
*/
166166
public function setPasswordRequestedAt(\DateTime $date = null);
167167

@@ -179,7 +179,7 @@ public function isPasswordRequestNonExpired($ttl);
179179
*
180180
* @param \DateTime $time
181181
*
182-
* @return self
182+
* @return static
183183
*/
184184
public function setLastLogin(\DateTime $time = null);
185185

@@ -204,7 +204,7 @@ public function hasRole($role);
204204
*
205205
* @param array $roles
206206
*
207-
* @return self
207+
* @return static
208208
*/
209209
public function setRoles(array $roles);
210210

@@ -213,7 +213,7 @@ public function setRoles(array $roles);
213213
*
214214
* @param string $role
215215
*
216-
* @return self
216+
* @return static
217217
*/
218218
public function addRole($role);
219219

@@ -222,7 +222,7 @@ public function addRole($role);
222222
*
223223
* @param string $role
224224
*
225-
* @return self
225+
* @return static
226226
*/
227227
public function removeRole($role);
228228
}

0 commit comments

Comments
 (0)