11<?php namespace Illuminate \Auth ;
22
33use Illuminate \Database \Connection ;
4- use Illuminate \Hashing \HasherInterface ;
4+ use Illuminate \Contracts \Auth \User as UserContract ;
5+ use Illuminate \Contracts \Hashing \Hasher as HasherContract ;
56
67class DatabaseUserProvider implements UserProviderInterface {
78
@@ -15,7 +16,7 @@ class DatabaseUserProvider implements UserProviderInterface {
1516 /**
1617 * The hasher implementation.
1718 *
18- * @var \Illuminate\Hashing\HasherInterface
19+ * @var \Illuminate\Contracts\ Hashing\Hasher
1920 */
2021 protected $ hasher ;
2122
@@ -30,11 +31,11 @@ class DatabaseUserProvider implements UserProviderInterface {
3031 * Create a new database user provider.
3132 *
3233 * @param \Illuminate\Database\Connection $conn
33- * @param \Illuminate\Hashing\HasherInterface $hasher
34+ * @param \Illuminate\Contracts\ Hashing\Hasher $hasher
3435 * @param string $table
3536 * @return void
3637 */
37- public function __construct (Connection $ conn , HasherInterface $ hasher , $ table )
38+ public function __construct (Connection $ conn , HasherContract $ hasher , $ table )
3839 {
3940 $ this ->conn = $ conn ;
4041 $ this ->table = $ table ;
@@ -45,7 +46,7 @@ public function __construct(Connection $conn, HasherInterface $hasher, $table)
4546 * Retrieve a user by their unique identifier.
4647 *
4748 * @param mixed $identifier
48- * @return \Illuminate\Auth\UserInterface |null
49+ * @return \Illuminate\Contracts\ Auth\User |null
4950 */
5051 public function retrieveById ($ identifier )
5152 {
@@ -62,7 +63,7 @@ public function retrieveById($identifier)
6263 *
6364 * @param mixed $identifier
6465 * @param string $token
65- * @return \Illuminate\Auth\UserInterface |null
66+ * @return \Illuminate\Contracts\ Auth\User |null
6667 */
6768 public function retrieveByToken ($ identifier , $ token )
6869 {
@@ -80,11 +81,11 @@ public function retrieveByToken($identifier, $token)
8081 /**
8182 * Update the "remember me" token for the given user in storage.
8283 *
83- * @param \Illuminate\Auth\UserInterface $user
84+ * @param \Illuminate\Contracts\ Auth\User $user
8485 * @param string $token
8586 * @return void
8687 */
87- public function updateRememberToken (UserInterface $ user , $ token )
88+ public function updateRememberToken (UserContract $ user , $ token )
8889 {
8990 $ this ->conn ->table ($ this ->table )
9091 ->where ('id ' , $ user ->getAuthIdentifier ())
@@ -95,7 +96,7 @@ public function updateRememberToken(UserInterface $user, $token)
9596 * Retrieve a user by the given credentials.
9697 *
9798 * @param array $credentials
98- * @return \Illuminate\Auth\UserInterface |null
99+ * @return \Illuminate\Contracts\ Auth\User |null
99100 */
100101 public function retrieveByCredentials (array $ credentials )
101102 {
@@ -126,11 +127,11 @@ public function retrieveByCredentials(array $credentials)
126127 /**
127128 * Validate a user against the given credentials.
128129 *
129- * @param \Illuminate\Auth\UserInterface $user
130+ * @param \Illuminate\Contracts\ Auth\User $user
130131 * @param array $credentials
131132 * @return bool
132133 */
133- public function validateCredentials (UserInterface $ user , array $ credentials )
134+ public function validateCredentials (UserContract $ user , array $ credentials )
134135 {
135136 $ plain = $ credentials ['password ' ];
136137
0 commit comments