summaryrefslogtreecommitdiffstats
path: root/Core
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2014-04-15 07:44:12 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2014-04-15 07:44:12 +0200
commit3c065747901d8ba53056cb769cb1ef986e39c1d0 (patch)
tree3540ae13ca5bf1b473c9ba7bcc17a3221a4ba981 /Core
parente5960cb3c8dc2c885c4fe784e957f8d1286f3fc7 (diff)
parentc9dff33575d2eb04e34c31167f5fba8bf3f355d6 (diff)
downloadsymfony-security-3c065747901d8ba53056cb769cb1ef986e39c1d0.zip
symfony-security-3c065747901d8ba53056cb769cb1ef986e39c1d0.tar.gz
symfony-security-3c065747901d8ba53056cb769cb1ef986e39c1d0.tar.bz2
minor #10701 Made types used by Symfony compatible with the ones of Hack (fabpot)
This PR was merged into the 2.3 branch. Discussion ---------- Made types used by Symfony compatible with the ones of Hack | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a PHP supports several ways to express types: like Boolean/bool or integer/int. Hack only supports one of them, so this PR proposes to use the Hack type to make Symfony a bit more "compatible" with Hack (gradual upgrade ;)). Commits ------- 3c9c10f made phpdoc types consistent with those defined in Hack 0555b7f made types consistent with those defined in Hack
Diffstat (limited to 'Core')
-rw-r--r--Core/Authentication/AuthenticationProviderManager.php4
-rw-r--r--Core/Authentication/Provider/DaoAuthenticationProvider.php2
-rw-r--r--Core/Authentication/Provider/UserAuthenticationProvider.php2
-rw-r--r--Core/Authentication/Token/AbstractToken.php4
-rw-r--r--Core/Authentication/Token/TokenInterface.php2
-rw-r--r--Core/Authorization/AccessDecisionManager.php8
-rw-r--r--Core/Encoder/BCryptPasswordEncoder.php2
-rw-r--r--Core/Encoder/MessageDigestPasswordEncoder.php4
-rw-r--r--Core/Encoder/Pbkdf2PasswordEncoder.php6
-rw-r--r--Core/Encoder/PlaintextPasswordEncoder.php2
-rw-r--r--Core/SecurityContext.php2
-rw-r--r--Core/Util/SecureRandomInterface.php2
12 files changed, 20 insertions, 20 deletions
diff --git a/Core/Authentication/AuthenticationProviderManager.php b/Core/Authentication/AuthenticationProviderManager.php
index 8b7474b..f713e8f 100644
--- a/Core/Authentication/AuthenticationProviderManager.php
+++ b/Core/Authentication/AuthenticationProviderManager.php
@@ -38,7 +38,7 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface
* Constructor.
*
* @param AuthenticationProviderInterface[] $providers An array of AuthenticationProviderInterface instances
- * @param Boolean $eraseCredentials Whether to erase credentials after authentication or not
+ * @param bool $eraseCredentials Whether to erase credentials after authentication or not
*
* @throws \InvalidArgumentException
*/
@@ -49,7 +49,7 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface
}
$this->providers = $providers;
- $this->eraseCredentials = (Boolean) $eraseCredentials;
+ $this->eraseCredentials = (bool) $eraseCredentials;
}
public function setEventDispatcher(EventDispatcherInterface $dispatcher)
diff --git a/Core/Authentication/Provider/DaoAuthenticationProvider.php b/Core/Authentication/Provider/DaoAuthenticationProvider.php
index a9a2205..4913be8 100644
--- a/Core/Authentication/Provider/DaoAuthenticationProvider.php
+++ b/Core/Authentication/Provider/DaoAuthenticationProvider.php
@@ -38,7 +38,7 @@ class DaoAuthenticationProvider extends UserAuthenticationProvider
* @param UserCheckerInterface $userChecker An UserCheckerInterface instance
* @param string $providerKey The provider key
* @param EncoderFactoryInterface $encoderFactory An EncoderFactoryInterface instance
- * @param Boolean $hideUserNotFoundExceptions Whether to hide user not found exception or not
+ * @param bool $hideUserNotFoundExceptions Whether to hide user not found exception or not
*/
public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, $providerKey, EncoderFactoryInterface $encoderFactory, $hideUserNotFoundExceptions = true)
{
diff --git a/Core/Authentication/Provider/UserAuthenticationProvider.php b/Core/Authentication/Provider/UserAuthenticationProvider.php
index 18c3e70..14fbdda 100644
--- a/Core/Authentication/Provider/UserAuthenticationProvider.php
+++ b/Core/Authentication/Provider/UserAuthenticationProvider.php
@@ -37,7 +37,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
*
* @param UserCheckerInterface $userChecker An UserCheckerInterface interface
* @param string $providerKey A provider key
- * @param Boolean $hideUserNotFoundExceptions Whether to hide user not found exception or not
+ * @param bool $hideUserNotFoundExceptions Whether to hide user not found exception or not
*
* @throws \InvalidArgumentException
*/
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php
index e4c46d5..b86e025 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -131,7 +131,7 @@ abstract class AbstractToken implements TokenInterface
*/
public function setAuthenticated($authenticated)
{
- $this->authenticated = (Boolean) $authenticated;
+ $this->authenticated = (bool) $authenticated;
}
/**
@@ -251,7 +251,7 @@ abstract class AbstractToken implements TokenInterface
}
if ($this->user instanceof EquatableInterface) {
- return ! (Boolean) $this->user->isEqualTo($user);
+ return ! (bool) $this->user->isEqualTo($user);
}
if ($this->user->getPassword() !== $user->getPassword()) {
diff --git a/Core/Authentication/Token/TokenInterface.php b/Core/Authentication/Token/TokenInterface.php
index 11f69da..a909469 100644
--- a/Core/Authentication/Token/TokenInterface.php
+++ b/Core/Authentication/Token/TokenInterface.php
@@ -76,7 +76,7 @@ interface TokenInterface extends \Serializable
/**
* Sets the authenticated flag.
*
- * @param Boolean $isAuthenticated The authenticated flag
+ * @param bool $isAuthenticated The authenticated flag
*/
public function setAuthenticated($isAuthenticated);
diff --git a/Core/Authorization/AccessDecisionManager.php b/Core/Authorization/AccessDecisionManager.php
index 6028c42..6e5effb 100644
--- a/Core/Authorization/AccessDecisionManager.php
+++ b/Core/Authorization/AccessDecisionManager.php
@@ -32,8 +32,8 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
*
* @param VoterInterface[] $voters An array of VoterInterface instances
* @param string $strategy The vote strategy
- * @param Boolean $allowIfAllAbstainDecisions Whether to grant access if all voters abstained or not
- * @param Boolean $allowIfEqualGrantedDeniedDecisions Whether to grant access if result are equals
+ * @param bool $allowIfAllAbstainDecisions Whether to grant access if all voters abstained or not
+ * @param bool $allowIfEqualGrantedDeniedDecisions Whether to grant access if result are equals
*
* @throws \InvalidArgumentException
*/
@@ -45,8 +45,8 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
$this->voters = $voters;
$this->strategy = 'decide'.ucfirst($strategy);
- $this->allowIfAllAbstainDecisions = (Boolean) $allowIfAllAbstainDecisions;
- $this->allowIfEqualGrantedDeniedDecisions = (Boolean) $allowIfEqualGrantedDeniedDecisions;
+ $this->allowIfAllAbstainDecisions = (bool) $allowIfAllAbstainDecisions;
+ $this->allowIfEqualGrantedDeniedDecisions = (bool) $allowIfEqualGrantedDeniedDecisions;
}
/**
diff --git a/Core/Encoder/BCryptPasswordEncoder.php b/Core/Encoder/BCryptPasswordEncoder.php
index 5a0f122..1dcf3a6 100644
--- a/Core/Encoder/BCryptPasswordEncoder.php
+++ b/Core/Encoder/BCryptPasswordEncoder.php
@@ -27,7 +27,7 @@ class BCryptPasswordEncoder extends BasePasswordEncoder
/**
* Constructor.
*
- * @param integer $cost The algorithmic cost that should be used
+ * @param int $cost The algorithmic cost that should be used
*
* @throws \RuntimeException When no BCrypt encoder is available
* @throws \InvalidArgumentException if cost is out of range
diff --git a/Core/Encoder/MessageDigestPasswordEncoder.php b/Core/Encoder/MessageDigestPasswordEncoder.php
index a7e5546..9aa240a 100644
--- a/Core/Encoder/MessageDigestPasswordEncoder.php
+++ b/Core/Encoder/MessageDigestPasswordEncoder.php
@@ -28,8 +28,8 @@ class MessageDigestPasswordEncoder extends BasePasswordEncoder
* Constructor.
*
* @param string $algorithm The digest algorithm to use
- * @param Boolean $encodeHashAsBase64 Whether to base64 encode the password hash
- * @param integer $iterations The number of iterations to use to stretch the password hash
+ * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash
+ * @param int $iterations The number of iterations to use to stretch the password hash
*/
public function __construct($algorithm = 'sha512', $encodeHashAsBase64 = true, $iterations = 5000)
{
diff --git a/Core/Encoder/Pbkdf2PasswordEncoder.php b/Core/Encoder/Pbkdf2PasswordEncoder.php
index 8a5a958..55b5261 100644
--- a/Core/Encoder/Pbkdf2PasswordEncoder.php
+++ b/Core/Encoder/Pbkdf2PasswordEncoder.php
@@ -37,9 +37,9 @@ class Pbkdf2PasswordEncoder extends BasePasswordEncoder
* Constructor.
*
* @param string $algorithm The digest algorithm to use
- * @param Boolean $encodeHashAsBase64 Whether to base64 encode the password hash
- * @param integer $iterations The number of iterations to use to stretch the password hash
- * @param integer $length Length of derived key to create
+ * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash
+ * @param int $iterations The number of iterations to use to stretch the password hash
+ * @param int $length Length of derived key to create
*/
public function __construct($algorithm = 'sha512', $encodeHashAsBase64 = true, $iterations = 1000, $length = 40)
{
diff --git a/Core/Encoder/PlaintextPasswordEncoder.php b/Core/Encoder/PlaintextPasswordEncoder.php
index 22f3da4..bdb058a 100644
--- a/Core/Encoder/PlaintextPasswordEncoder.php
+++ b/Core/Encoder/PlaintextPasswordEncoder.php
@@ -25,7 +25,7 @@ class PlaintextPasswordEncoder extends BasePasswordEncoder
/**
* Constructor.
*
- * @param Boolean $ignorePasswordCase Compare password case-insensitive
+ * @param bool $ignorePasswordCase Compare password case-insensitive
*/
public function __construct($ignorePasswordCase = false)
{
diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php
index c55cecf..0326f1d 100644
--- a/Core/SecurityContext.php
+++ b/Core/SecurityContext.php
@@ -36,7 +36,7 @@ class SecurityContext implements SecurityContextInterface
*
* @param AuthenticationManagerInterface $authenticationManager An AuthenticationManager instance
* @param AccessDecisionManagerInterface|null $accessDecisionManager An AccessDecisionManager instance
- * @param Boolean $alwaysAuthenticate
+ * @param bool $alwaysAuthenticate
*/
public function __construct(AuthenticationManagerInterface $authenticationManager, AccessDecisionManagerInterface $accessDecisionManager, $alwaysAuthenticate = false)
{
diff --git a/Core/Util/SecureRandomInterface.php b/Core/Util/SecureRandomInterface.php
index 2c35a72..2cf7779 100644
--- a/Core/Util/SecureRandomInterface.php
+++ b/Core/Util/SecureRandomInterface.php
@@ -21,7 +21,7 @@ interface SecureRandomInterface
/**
* Generates the specified number of secure random bytes.
*
- * @param integer $nbBytes
+ * @param int $nbBytes
*
* @return string
*/