Skip to content

Commit 193d4a0

Browse files
committed
Remove by ref method declaration from authorization class
1 parent 96ef084 commit 193d4a0

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/Authentication.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ private function authenticatedUsingAdapters(ServerRequestInterface $request)
230230
/**
231231
* {@inheritdoc}
232232
*/
233-
public function &getAuthenticatedUser()
233+
public function getAuthenticatedUser()
234234
{
235235
return $this->authenticated_user;
236236
}
237237

238238
/**
239239
* {@inheritdoc}
240240
*/
241-
public function &setAuthenticatedUser(AuthenticatedUserInterface $user = null)
241+
public function setAuthenticatedUser(AuthenticatedUserInterface $user = null)
242242
{
243243
$this->authenticated_user = $user;
244244

@@ -258,7 +258,7 @@ public function getAuthenticatedWith()
258258
/**
259259
* {@inheritdoc}
260260
*/
261-
public function &setAuthenticatedWith(AuthenticationResultInterface $value)
261+
public function setAuthenticatedWith(AuthenticationResultInterface $value)
262262
{
263263
$this->authenticated_with = $value;
264264

@@ -272,7 +272,7 @@ public function &setAuthenticatedWith(AuthenticationResultInterface $value)
272272
* @param array $arguments
273273
* @return $this
274274
*/
275-
private function &triggerEvent($event_name, ...$arguments)
275+
private function triggerEvent($event_name, ...$arguments)
276276
{
277277
$property_name = "on_{$event_name}";
278278

@@ -287,21 +287,21 @@ private function &triggerEvent($event_name, ...$arguments)
287287
/**
288288
* {@inheritdoc}
289289
*/
290-
public function &onUserAuthenticated(callable $value)
290+
public function onUserAuthenticated(callable $value)
291291
{
292292
$this->on_user_authenticated[] = $value;
293293

294294
return $this;
295295
}
296296

297-
public function &onUserAuthorized(callable $value)
297+
public function onUserAuthorized(callable $value)
298298
{
299299
$this->on_user_authorized[] = $value;
300300

301301
return $this;
302302
}
303303

304-
public function &onUserAuthorizationFailed(callable $value)
304+
public function onUserAuthorizationFailed(callable $value)
305305
{
306306
$this->on_user_authorization_failed[] = $value;
307307

@@ -311,14 +311,14 @@ public function &onUserAuthorizationFailed(callable $value)
311311
/**
312312
* {@inheritdoc}
313313
*/
314-
public function &onUserSet(callable $value)
314+
public function onUserSet(callable $value)
315315
{
316316
$this->on_user_set[] = $value;
317317

318318
return $this;
319319
}
320320

321-
public function &onUserDeauthenticated(callable $value)
321+
public function onUserDeauthenticated(callable $value)
322322
{
323323
$this->on_user_deauthenticated[] = $value;
324324

@@ -330,7 +330,7 @@ public function &onUserDeauthenticated(callable $value)
330330
*
331331
* {@inheritdoc}
332332
*/
333-
public function &setOnAuthenciatedUserChanged(callable $value = null)
333+
public function setOnAuthenciatedUserChanged(callable $value = null)
334334
{
335335
if (empty($value)) {
336336
throw new InvalidArgumentException('Value needs to be a callable.');

src/AuthenticationInterface.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ public function getAdapters();
6565
*
6666
* @return AuthenticatedUserInterface
6767
*/
68-
public function &getAuthenticatedUser();
68+
public function getAuthenticatedUser();
6969

7070
/**
7171
* Override authentication adapter and force set logged user for this request.
7272
*
7373
* @param AuthenticatedUserInterface|null $user
7474
* @return $this
7575
*/
76-
public function &setAuthenticatedUser(AuthenticatedUserInterface $user = null);
76+
public function setAuthenticatedUser(AuthenticatedUserInterface $user = null);
7777

7878
/**
7979
* @return AuthenticationResultInterface|null
@@ -84,37 +84,37 @@ public function getAuthenticatedWith();
8484
* @param AuthenticationResultInterface $value
8585
* @return $this
8686
*/
87-
public function &setAuthenticatedWith(AuthenticationResultInterface $value);
87+
public function setAuthenticatedWith(AuthenticationResultInterface $value);
8888

8989
/**
9090
* @param callable $value
9191
* @return $this
9292
*/
93-
public function &onUserAuthenticated(callable $value);
93+
public function onUserAuthenticated(callable $value);
9494

9595
/**
9696
* @param callable $value
9797
* @return $this
9898
*/
99-
public function &onUserAuthorized(callable $value);
99+
public function onUserAuthorized(callable $value);
100100

101101
/**
102102
* @param callable $value
103103
* @return $this
104104
*/
105-
public function &onUserAuthorizationFailed(callable $value);
105+
public function onUserAuthorizationFailed(callable $value);
106106

107107
/**
108108
* @param callable $value
109109
* @return $this
110110
*/
111-
public function &onUserSet(callable $value);
111+
public function onUserSet(callable $value);
112112

113113
/**
114114
* @param callable $value
115115
* @return $this
116116
*/
117-
public function &onUserDeauthenticated(callable $value);
117+
public function onUserDeauthenticated(callable $value);
118118

119119
/**
120120
* Use onUserSet() instead.
@@ -123,5 +123,5 @@ public function &onUserDeauthenticated(callable $value);
123123
* @return $this
124124
* @deprecated
125125
*/
126-
public function &setOnAuthenciatedUserChanged(callable $value = null);
126+
public function setOnAuthenciatedUserChanged(callable $value = null);
127127
}

0 commit comments

Comments
 (0)