瀏覽代碼

merged branch Maks3w/patch-4 (PR #4616)

Commits
-------

fa050b7 [Security] Change return value in DocBlock

Discussion
----------

[Security] Change return value in DocBlock

Change the return value for avoid confusions.

```php
if (!$user instanceof UserInterface) {
    throw new AuthenticationServiceException('retrieveUser() must return a UserInterface.');
}
```

[UserAuthenticationProvider.php#L67](https://github.com/symfony/symfony/tree/2.0/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php#L67)

---------------------------------------------------------------------------

by travisbot at 2012-06-19T21:03:07Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1659148) (merged fa050b77 into e78a7bae).
Fabien Potencier 13 年之前
父節點
當前提交
15ae25b2e2

+ 1 - 1
src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php

@@ -101,7 +101,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
      * @param string                $username The username to retrieve
      * @param UsernamePasswordToken $token    The Token
      *
-     * @return array The user
+     * @return UserInterface The user
      *
      * @throws AuthenticationException if the credentials could not be validated
      */