Skip to content

Commit

Permalink
[SecurityBundle] fix return type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 25, 2019
1 parent 4adb2d5 commit d198985
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
Expand Up @@ -231,7 +231,7 @@ public function getUser()
/**
* Gets the roles of the user.
*
* @return array The roles
* @return array|Data
*/
public function getRoles()
{
Expand All @@ -241,7 +241,7 @@ public function getRoles()
/**
* Gets the inherited roles of the user.
*
* @return array The inherited roles
* @return array|Data
*/
public function getInheritedRoles()
{
Expand Down Expand Up @@ -269,16 +269,25 @@ public function isAuthenticated()
return $this->data['authenticated'];
}

/**
* @return bool
*/
public function isImpersonated()
{
return $this->data['impersonated'];
}

/**
* @return string|null
*/
public function getImpersonatorUser()
{
return $this->data['impersonator_user'];
}

/**
* @return string|null
*/
public function getImpersonationExitPath()
{
return $this->data['impersonation_exit_path'];
Expand All @@ -287,7 +296,7 @@ public function getImpersonationExitPath()
/**
* Get the class name of the security token.
*
* @return string The token
* @return string|Data|null The token
*/
public function getTokenClass()
{
Expand All @@ -297,7 +306,7 @@ public function getTokenClass()
/**
* Get the full security token class as Data object.
*
* @return Data
* @return Data|null
*/
public function getToken()
{
Expand All @@ -307,7 +316,7 @@ public function getToken()
/**
* Get the logout URL.
*
* @return string The logout URL
* @return string|null The logout URL
*/
public function getLogoutUrl()
{
Expand All @@ -317,7 +326,7 @@ public function getLogoutUrl()
/**
* Returns the FQCN of the security voters enabled in the application.
*
* @return string[]
* @return string[]|Data
*/
public function getVoters()
{
Expand All @@ -337,7 +346,7 @@ public function getVoterStrategy()
/**
* Returns the log of the security decisions made by the access decision manager.
*
* @return array
* @return array|Data
*/
public function getAccessDecisionLog()
{
Expand All @@ -347,13 +356,16 @@ public function getAccessDecisionLog()
/**
* Returns the configuration of the current firewall context.
*
* @return array
* @return array|Data
*/
public function getFirewall()
{
return $this->data['firewall'];
}

/**
* @return array|Data
*/
public function getListeners()
{
return $this->data['listeners'];
Expand Down
Expand Up @@ -130,9 +130,9 @@ abstract protected function getListenerId();
* @param ContainerBuilder $container
* @param string $id
* @param array $config
* @param string $defaultEntryPointId
* @param string|null $defaultEntryPointId
*
* @return string the entry point id
* @return string|null the entry point id
*/
protected function createEntryPoint($container, $id, $config, $defaultEntryPointId)
{
Expand Down
Expand Up @@ -24,10 +24,10 @@ interface SecurityFactoryInterface
/**
* Configures the container services required to use the authentication listener.
*
* @param string $id The unique id of the firewall
* @param array $config The options array for the listener
* @param string $userProvider The service id of the user provider
* @param string $defaultEntryPoint
* @param string $id The unique id of the firewall
* @param array $config The options array for the listener
* @param string $userProvider The service id of the user provider
* @param string|null $defaultEntryPoint
*
* @return array containing three values:
* - the provider id
Expand Down

0 comments on commit d198985

Please sign in to comment.