Skip to content

Commit bc5a4e8

Browse files
[SecurityBundle] fix return type declarations
1 parent 3f1b578 commit bc5a4e8

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

DataCollector/SecurityDataCollector.php

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function getUser()
231231
/**
232232
* Gets the roles of the user.
233233
*
234-
* @return array The roles
234+
* @return array|Data
235235
*/
236236
public function getRoles()
237237
{
@@ -241,7 +241,7 @@ public function getRoles()
241241
/**
242242
* Gets the inherited roles of the user.
243243
*
244-
* @return array The inherited roles
244+
* @return array|Data
245245
*/
246246
public function getInheritedRoles()
247247
{
@@ -269,16 +269,25 @@ public function isAuthenticated()
269269
return $this->data['authenticated'];
270270
}
271271

272+
/**
273+
* @return bool
274+
*/
272275
public function isImpersonated()
273276
{
274277
return $this->data['impersonated'];
275278
}
276279

280+
/**
281+
* @return string|null
282+
*/
277283
public function getImpersonatorUser()
278284
{
279285
return $this->data['impersonator_user'];
280286
}
281287

288+
/**
289+
* @return string|null
290+
*/
282291
public function getImpersonationExitPath()
283292
{
284293
return $this->data['impersonation_exit_path'];
@@ -287,7 +296,7 @@ public function getImpersonationExitPath()
287296
/**
288297
* Get the class name of the security token.
289298
*
290-
* @return string The token
299+
* @return string|Data|null The token
291300
*/
292301
public function getTokenClass()
293302
{
@@ -297,7 +306,7 @@ public function getTokenClass()
297306
/**
298307
* Get the full security token class as Data object.
299308
*
300-
* @return Data
309+
* @return Data|null
301310
*/
302311
public function getToken()
303312
{
@@ -307,7 +316,7 @@ public function getToken()
307316
/**
308317
* Get the logout URL.
309318
*
310-
* @return string The logout URL
319+
* @return string|null The logout URL
311320
*/
312321
public function getLogoutUrl()
313322
{
@@ -317,7 +326,7 @@ public function getLogoutUrl()
317326
/**
318327
* Returns the FQCN of the security voters enabled in the application.
319328
*
320-
* @return string[]
329+
* @return string[]|Data
321330
*/
322331
public function getVoters()
323332
{
@@ -337,7 +346,7 @@ public function getVoterStrategy()
337346
/**
338347
* Returns the log of the security decisions made by the access decision manager.
339348
*
340-
* @return array
349+
* @return array|Data
341350
*/
342351
public function getAccessDecisionLog()
343352
{
@@ -347,13 +356,16 @@ public function getAccessDecisionLog()
347356
/**
348357
* Returns the configuration of the current firewall context.
349358
*
350-
* @return array
359+
* @return array|Data
351360
*/
352361
public function getFirewall()
353362
{
354363
return $this->data['firewall'];
355364
}
356365

366+
/**
367+
* @return array|Data
368+
*/
357369
public function getListeners()
358370
{
359371
return $this->data['listeners'];

DependencyInjection/Security/Factory/AbstractFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ abstract protected function getListenerId();
130130
* @param ContainerBuilder $container
131131
* @param string $id
132132
* @param array $config
133-
* @param string $defaultEntryPointId
133+
* @param string|null $defaultEntryPointId
134134
*
135-
* @return string the entry point id
135+
* @return string|null the entry point id
136136
*/
137137
protected function createEntryPoint($container, $id, $config, $defaultEntryPointId)
138138
{

DependencyInjection/Security/Factory/SecurityFactoryInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ interface SecurityFactoryInterface
2424
/**
2525
* Configures the container services required to use the authentication listener.
2626
*
27-
* @param string $id The unique id of the firewall
28-
* @param array $config The options array for the listener
29-
* @param string $userProvider The service id of the user provider
30-
* @param string $defaultEntryPoint
27+
* @param string $id The unique id of the firewall
28+
* @param array $config The options array for the listener
29+
* @param string $userProvider The service id of the user provider
30+
* @param string|null $defaultEntryPoint
3131
*
3232
* @return array containing three values:
3333
* - the provider id

0 commit comments

Comments
 (0)