diff --git a/framework/core/src/Api/Actions/Activity/IndexAction.php b/framework/core/src/Api/Actions/Activity/IndexAction.php index 6c5165f0a..b78552da0 100644 --- a/framework/core/src/Api/Actions/Activity/IndexAction.php +++ b/framework/core/src/Api/Actions/Activity/IndexAction.php @@ -1,7 +1,7 @@ users = $users; $this->activity = $activity; diff --git a/framework/core/src/Api/Actions/Discussions/ShowAction.php b/framework/core/src/Api/Actions/Discussions/ShowAction.php index 043d380f9..04a7f4e6f 100644 --- a/framework/core/src/Api/Actions/Discussions/ShowAction.php +++ b/framework/core/src/Api/Actions/Discussions/ShowAction.php @@ -1,7 +1,7 @@ discussions = $discussions; $this->posts = $posts; diff --git a/framework/core/src/Api/Actions/Notifications/IndexAction.php b/framework/core/src/Api/Actions/Notifications/IndexAction.php index db22df77c..6b9000204 100644 --- a/framework/core/src/Api/Actions/Notifications/IndexAction.php +++ b/framework/core/src/Api/Actions/Notifications/IndexAction.php @@ -1,6 +1,6 @@ notifications = $notifications; } diff --git a/framework/core/src/Api/Actions/Posts/GetsPosts.php b/framework/core/src/Api/Actions/Posts/GetsPosts.php index bd9cc5df6..5fb52022c 100644 --- a/framework/core/src/Api/Actions/Posts/GetsPosts.php +++ b/framework/core/src/Api/Actions/Posts/GetsPosts.php @@ -5,7 +5,7 @@ use Flarum\Api\JsonApiRequest; trait GetsPosts { /** - * @var \Flarum\Core\Posts\PostRepositoryInterface + * @var \Flarum\Core\Posts\PostRepository */ protected $posts; diff --git a/framework/core/src/Api/Actions/Posts/IndexAction.php b/framework/core/src/Api/Actions/Posts/IndexAction.php index 9fbd90217..c6627b9f1 100644 --- a/framework/core/src/Api/Actions/Posts/IndexAction.php +++ b/framework/core/src/Api/Actions/Posts/IndexAction.php @@ -1,6 +1,6 @@ posts = $posts; } diff --git a/framework/core/src/Api/Actions/Posts/ShowAction.php b/framework/core/src/Api/Actions/Posts/ShowAction.php index 05f172e8e..8c67757b1 100644 --- a/framework/core/src/Api/Actions/Posts/ShowAction.php +++ b/framework/core/src/Api/Actions/Posts/ShowAction.php @@ -1,7 +1,7 @@ posts = $posts; } diff --git a/framework/core/src/Api/Actions/TokenAction.php b/framework/core/src/Api/Actions/TokenAction.php index b65105266..c4786f519 100644 --- a/framework/core/src/Api/Actions/TokenAction.php +++ b/framework/core/src/Api/Actions/TokenAction.php @@ -2,7 +2,7 @@ use Flarum\Api\Commands\GenerateAccessToken; use Flarum\Api\Request; -use Flarum\Core\Users\UserRepositoryInterface; +use Flarum\Core\Users\UserRepository; use Flarum\Core\Exceptions\PermissionDeniedException; use Flarum\Core\Users\Events\UserEmailChangeWasRequested; use Illuminate\Contracts\Bus\Dispatcher; @@ -14,7 +14,7 @@ class TokenAction extends JsonApiAction protected $bus; - public function __construct(UserRepositoryInterface $users, Dispatcher $bus) + public function __construct(UserRepository $users, Dispatcher $bus) { $this->users = $users; $this->bus = $bus; diff --git a/framework/core/src/Api/Actions/Users/ShowAction.php b/framework/core/src/Api/Actions/Users/ShowAction.php index 4fdf1f782..263636b8f 100644 --- a/framework/core/src/Api/Actions/Users/ShowAction.php +++ b/framework/core/src/Api/Actions/Users/ShowAction.php @@ -1,6 +1,6 @@ users = $users; } diff --git a/framework/core/src/Core/Activity/EloquentActivityRepository.php b/framework/core/src/Core/Activity/ActivityRepository.php similarity index 74% rename from framework/core/src/Core/Activity/EloquentActivityRepository.php rename to framework/core/src/Core/Activity/ActivityRepository.php index a1fdf9b3f..d74135d83 100644 --- a/framework/core/src/Core/Activity/EloquentActivityRepository.php +++ b/framework/core/src/Core/Activity/ActivityRepository.php @@ -2,10 +2,17 @@ use Flarum\Core\Users\User; -class EloquentActivityRepository implements ActivityRepositoryInterface +class ActivityRepository { /** - * {@inheritdoc} + * Find a user's activity. + * + * @param int $userId + * @param User $actor + * @param null|int $limit + * @param int $offset + * @param null|string $type + * @return \Illuminate\Database\Eloquent\Collection */ public function findByUser($userId, User $actor, $limit = null, $offset = 0, $type = null) { diff --git a/framework/core/src/Core/Activity/ActivityRepositoryInterface.php b/framework/core/src/Core/Activity/ActivityRepositoryInterface.php deleted file mode 100644 index e274fbd55..000000000 --- a/framework/core/src/Core/Activity/ActivityRepositoryInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -activity = $activity; } diff --git a/framework/core/src/Core/Discussions/Commands/DeleteDiscussionHandler.php b/framework/core/src/Core/Discussions/Commands/DeleteDiscussionHandler.php index 35f6ad946..b09c0d7f5 100644 --- a/framework/core/src/Core/Discussions/Commands/DeleteDiscussionHandler.php +++ b/framework/core/src/Core/Discussions/Commands/DeleteDiscussionHandler.php @@ -1,6 +1,6 @@ discussions = $discussions; } diff --git a/framework/core/src/Core/Discussions/Commands/EditDiscussionHandler.php b/framework/core/src/Core/Discussions/Commands/EditDiscussionHandler.php index ef1649c55..88ca714ad 100644 --- a/framework/core/src/Core/Discussions/Commands/EditDiscussionHandler.php +++ b/framework/core/src/Core/Discussions/Commands/EditDiscussionHandler.php @@ -1,6 +1,6 @@ discussions = $discussions; } diff --git a/framework/core/src/Core/Discussions/Commands/ReadDiscussionHandler.php b/framework/core/src/Core/Discussions/Commands/ReadDiscussionHandler.php index b8978b6cf..a03003069 100644 --- a/framework/core/src/Core/Discussions/Commands/ReadDiscussionHandler.php +++ b/framework/core/src/Core/Discussions/Commands/ReadDiscussionHandler.php @@ -1,6 +1,6 @@ discussions = $discussions; } diff --git a/framework/core/src/Core/Discussions/EloquentDiscussionRepository.php b/framework/core/src/Core/Discussions/DiscussionRepository.php similarity index 95% rename from framework/core/src/Core/Discussions/EloquentDiscussionRepository.php rename to framework/core/src/Core/Discussions/DiscussionRepository.php index 316e9fa91..35e48caae 100644 --- a/framework/core/src/Core/Discussions/EloquentDiscussionRepository.php +++ b/framework/core/src/Core/Discussions/DiscussionRepository.php @@ -3,7 +3,7 @@ use Illuminate\Database\Eloquent\Builder; use Flarum\Core\Users\User; -class EloquentDiscussionRepository implements DiscussionRepositoryInterface +class DiscussionRepository { /** * Get a new query builder for the discussions table. diff --git a/framework/core/src/Core/Discussions/DiscussionRepositoryInterface.php b/framework/core/src/Core/Discussions/DiscussionRepositoryInterface.php deleted file mode 100644 index e9f20ab7d..000000000 --- a/framework/core/src/Core/Discussions/DiscussionRepositoryInterface.php +++ /dev/null @@ -1,33 +0,0 @@ -app->bind( - 'Flarum\Core\Discussions\DiscussionRepositoryInterface', - 'Flarum\Core\Discussions\EloquentDiscussionRepository' - ); - $this->app->bind( 'Flarum\Core\Discussions\Search\Fulltext\DriverInterface', 'Flarum\Core\Discussions\Search\Fulltext\MySqlFulltextDriver' diff --git a/framework/core/src/Core/Discussions/Search/DiscussionSearcher.php b/framework/core/src/Core/Discussions/Search/DiscussionSearcher.php index 3004671d3..a28419591 100644 --- a/framework/core/src/Core/Discussions/Search/DiscussionSearcher.php +++ b/framework/core/src/Core/Discussions/Search/DiscussionSearcher.php @@ -5,8 +5,8 @@ use Flarum\Core\Search\AppliesParametersToSearch; use Flarum\Core\Search\SearchCriteria; use Flarum\Core\Search\SearcherInterface; use Flarum\Core\Search\GambitManager; -use Flarum\Core\Discussions\DiscussionRepositoryInterface; -use Flarum\Core\Posts\PostRepositoryInterface; +use Flarum\Core\Discussions\DiscussionRepository; +use Flarum\Core\Posts\PostRepository; use Flarum\Core\Discussions\Events\DiscussionSearchWillBePerformed; use Flarum\Core\Search\SearchResults; use Illuminate\Database\Eloquent\Collection; @@ -25,24 +25,24 @@ class DiscussionSearcher protected $gambits; /** - * @var DiscussionRepositoryInterface + * @var DiscussionRepository */ protected $discussions; /** - * @var PostRepositoryInterface + * @var PostRepository */ protected $posts; /** * @param GambitManager $gambits - * @param DiscussionRepositoryInterface $discussions - * @param PostRepositoryInterface $posts + * @param DiscussionRepository $discussions + * @param PostRepository $posts */ public function __construct( GambitManager $gambits, - DiscussionRepositoryInterface $discussions, - PostRepositoryInterface $posts + DiscussionRepository $discussions, + PostRepository $posts ) { $this->gambits = $gambits; $this->discussions = $discussions; diff --git a/framework/core/src/Core/Discussions/Search/Gambits/AuthorGambit.php b/framework/core/src/Core/Discussions/Search/Gambits/AuthorGambit.php index e950749c9..1413dd191 100644 --- a/framework/core/src/Core/Discussions/Search/Gambits/AuthorGambit.php +++ b/framework/core/src/Core/Discussions/Search/Gambits/AuthorGambit.php @@ -1,7 +1,7 @@ users = $users; } diff --git a/framework/core/src/Core/Discussions/Search/Gambits/FulltextGambit.php b/framework/core/src/Core/Discussions/Search/Gambits/FulltextGambit.php index 66b7bec16..1384d211c 100644 --- a/framework/core/src/Core/Discussions/Search/Gambits/FulltextGambit.php +++ b/framework/core/src/Core/Discussions/Search/Gambits/FulltextGambit.php @@ -1,7 +1,7 @@ posts = $posts; } diff --git a/framework/core/src/Core/Discussions/Search/Gambits/UnreadGambit.php b/framework/core/src/Core/Discussions/Search/Gambits/UnreadGambit.php index 1aa87f435..e10a2ed98 100644 --- a/framework/core/src/Core/Discussions/Search/Gambits/UnreadGambit.php +++ b/framework/core/src/Core/Discussions/Search/Gambits/UnreadGambit.php @@ -1,6 +1,6 @@ discussions = $discussions; } diff --git a/framework/core/src/Core/Notifications/EloquentNotificationRepository.php b/framework/core/src/Core/Notifications/NotificationRepository.php similarity index 81% rename from framework/core/src/Core/Notifications/EloquentNotificationRepository.php rename to framework/core/src/Core/Notifications/NotificationRepository.php index 6aca56947..d0beaf007 100644 --- a/framework/core/src/Core/Notifications/EloquentNotificationRepository.php +++ b/framework/core/src/Core/Notifications/NotificationRepository.php @@ -2,10 +2,15 @@ use Flarum\Core\Users\User; -class EloquentNotificationRepository implements NotificationRepositoryInterface +class NotificationRepository { /** - * {@inheritdoc} + * Find a user's notifications. + * + * @param User $user + * @param int|null $limit + * @param int $offset + * @return \Illuminate\Database\Eloquent\Collection */ public function findByUser(User $user, $limit = null, $offset = 0) { diff --git a/framework/core/src/Core/Notifications/NotificationRepositoryInterface.php b/framework/core/src/Core/Notifications/NotificationRepositoryInterface.php deleted file mode 100644 index df24a5997..000000000 --- a/framework/core/src/Core/Notifications/NotificationRepositoryInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -notifications = $notifications; diff --git a/framework/core/src/Core/Notifications/NotificationsServiceProvider.php b/framework/core/src/Core/Notifications/NotificationsServiceProvider.php index aa8662d16..f72a8f426 100644 --- a/framework/core/src/Core/Notifications/NotificationsServiceProvider.php +++ b/framework/core/src/Core/Notifications/NotificationsServiceProvider.php @@ -28,9 +28,5 @@ class NotificationsServiceProvider extends ServiceProvider */ public function register() { - $this->app->bind( - 'Flarum\Core\Notifications\NotificationRepositoryInterface', - 'Flarum\Core\Notifications\EloquentNotificationRepository' - ); } } diff --git a/framework/core/src/Core/Posts/Commands/DeletePostHandler.php b/framework/core/src/Core/Posts/Commands/DeletePostHandler.php index 3b386558c..cc5d7b43b 100644 --- a/framework/core/src/Core/Posts/Commands/DeletePostHandler.php +++ b/framework/core/src/Core/Posts/Commands/DeletePostHandler.php @@ -1,6 +1,6 @@ posts = $posts; } diff --git a/framework/core/src/Core/Posts/Commands/EditPostHandler.php b/framework/core/src/Core/Posts/Commands/EditPostHandler.php index 52c38b06b..21cb48a82 100644 --- a/framework/core/src/Core/Posts/Commands/EditPostHandler.php +++ b/framework/core/src/Core/Posts/Commands/EditPostHandler.php @@ -1,6 +1,6 @@ posts = $posts; } diff --git a/framework/core/src/Core/Posts/Commands/PostReplyHandler.php b/framework/core/src/Core/Posts/Commands/PostReplyHandler.php index d92f9b767..c2a8c43bc 100644 --- a/framework/core/src/Core/Posts/Commands/PostReplyHandler.php +++ b/framework/core/src/Core/Posts/Commands/PostReplyHandler.php @@ -1,7 +1,7 @@ discussions = $discussions; $this->notifications = $notifications; diff --git a/framework/core/src/Core/Posts/EloquentPostRepository.php b/framework/core/src/Core/Posts/PostRepository.php similarity index 75% rename from framework/core/src/Core/Posts/EloquentPostRepository.php rename to framework/core/src/Core/Posts/PostRepository.php index 3ec4295e1..da929f840 100644 --- a/framework/core/src/Core/Posts/EloquentPostRepository.php +++ b/framework/core/src/Core/Posts/PostRepository.php @@ -26,7 +26,7 @@ use Flarum\Core\Discussions\Search\Fulltext\DriverInterface; // 14. Api\Discussions\ShowAction: eager load mentions // 14. Serializers\DiscussionSerializer: load discussion-user state -class EloquentPostRepository implements PostRepositoryInterface +class PostRepository { protected $fulltext; @@ -36,7 +36,14 @@ class EloquentPostRepository implements PostRepositoryInterface } /** - * {@inheritdoc} + * Find a post by ID, optionally making sure it is visible to a certain + * user, or throw an exception. + * + * @param integer $id + * @param \Flarum\Core\Users\User $actor + * @return \Flarum\Core\Posts\Post + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ public function findOrFail($id, User $actor = null) { @@ -50,7 +57,15 @@ class EloquentPostRepository implements PostRepositoryInterface } /** - * {@inheritdoc} + * Find posts that match certain conditions, optionally making sure they + * are visible to a certain user, and/or using other criteria. + * + * @param array $where + * @param \Flarum\Core\Users\User|null $actor + * @param array $sort + * @param integer $count + * @param integer $start + * @return \Illuminate\Database\Eloquent\Collection */ public function findWhere($where = [], User $actor = null, $sort = [], $count = null, $start = 0) { @@ -68,7 +83,12 @@ class EloquentPostRepository implements PostRepositoryInterface } /** - * {@inheritdoc} + * Find posts by their IDs, optionally making sure they are visible to a + * certain user. + * + * @param array $ids + * @param \Flarum\Core\Users\User|null $actor + * @return \Illuminate\Database\Eloquent\Collection */ public function findByIds(array $ids, User $actor = null) { @@ -80,7 +100,12 @@ class EloquentPostRepository implements PostRepositoryInterface } /** - * {@inheritdoc} + * Find posts by matching a string of words against their content, + * optionally making sure they are visible to a certain user. + * + * @param string $string + * @param \Flarum\Core\Users\User|null $actor + * @return \Illuminate\Database\Eloquent\Collection */ public function findByContent($string, User $actor = null) { @@ -100,7 +125,14 @@ class EloquentPostRepository implements PostRepositoryInterface } /** - * {@inheritdoc} + * Get the position within a discussion where a post with a certain number + * is. If the post with that number does not exist, the index of the + * closest post to it will be returned. + * + * @param integer $discussionId + * @param integer $number + * @param \Flarum\Core\Users\User|null $actor + * @return integer */ public function getIndexForNumber($discussionId, $number, User $actor = null) { diff --git a/framework/core/src/Core/Posts/PostRepositoryInterface.php b/framework/core/src/Core/Posts/PostRepositoryInterface.php deleted file mode 100644 index a407926b2..000000000 --- a/framework/core/src/Core/Posts/PostRepositoryInterface.php +++ /dev/null @@ -1,63 +0,0 @@ -app->bind( - 'Flarum\Core\Posts\PostRepositoryInterface', - 'Flarum\Core\Posts\EloquentPostRepository' - ); } } diff --git a/framework/core/src/Core/Users/Commands/ConfirmEmailHandler.php b/framework/core/src/Core/Users/Commands/ConfirmEmailHandler.php index d307130d5..d0eac4411 100644 --- a/framework/core/src/Core/Users/Commands/ConfirmEmailHandler.php +++ b/framework/core/src/Core/Users/Commands/ConfirmEmailHandler.php @@ -1,6 +1,6 @@ users = $users; } diff --git a/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php b/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php index f760b6add..dde832e5c 100644 --- a/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php +++ b/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php @@ -1,7 +1,7 @@ users = $users; $this->uploadDir = $uploadDir; diff --git a/framework/core/src/Core/Users/Commands/DeleteUserHandler.php b/framework/core/src/Core/Users/Commands/DeleteUserHandler.php index b413b7614..75188ac7c 100644 --- a/framework/core/src/Core/Users/Commands/DeleteUserHandler.php +++ b/framework/core/src/Core/Users/Commands/DeleteUserHandler.php @@ -1,7 +1,7 @@ users = $users; } diff --git a/framework/core/src/Core/Users/Commands/EditUserHandler.php b/framework/core/src/Core/Users/Commands/EditUserHandler.php index 567be3a90..0048011cb 100644 --- a/framework/core/src/Core/Users/Commands/EditUserHandler.php +++ b/framework/core/src/Core/Users/Commands/EditUserHandler.php @@ -1,7 +1,7 @@ users = $users; } diff --git a/framework/core/src/Core/Users/Commands/RequestPasswordResetHandler.php b/framework/core/src/Core/Users/Commands/RequestPasswordResetHandler.php index 5666248c2..8c86ab41c 100644 --- a/framework/core/src/Core/Users/Commands/RequestPasswordResetHandler.php +++ b/framework/core/src/Core/Users/Commands/RequestPasswordResetHandler.php @@ -1,7 +1,7 @@ users = $users; $this->mailer = $mailer; diff --git a/framework/core/src/Core/Users/Commands/UploadAvatarHandler.php b/framework/core/src/Core/Users/Commands/UploadAvatarHandler.php index 3d5ff29b1..bdf4bcba7 100644 --- a/framework/core/src/Core/Users/Commands/UploadAvatarHandler.php +++ b/framework/core/src/Core/Users/Commands/UploadAvatarHandler.php @@ -1,7 +1,7 @@ users = $users; $this->uploadDir = $uploadDir; diff --git a/framework/core/src/Core/Users/Search/Gambits/FulltextGambit.php b/framework/core/src/Core/Users/Search/Gambits/FulltextGambit.php index 0f68e1df0..c383cf807 100644 --- a/framework/core/src/Core/Users/Search/Gambits/FulltextGambit.php +++ b/framework/core/src/Core/Users/Search/Gambits/FulltextGambit.php @@ -1,20 +1,20 @@ users = $users; } diff --git a/framework/core/src/Core/Users/Search/UserSearcher.php b/framework/core/src/Core/Users/Search/UserSearcher.php index 891e4f30c..17a1a0000 100644 --- a/framework/core/src/Core/Users/Search/UserSearcher.php +++ b/framework/core/src/Core/Users/Search/UserSearcher.php @@ -4,7 +4,7 @@ use Flarum\Core\Search\AppliesParametersToSearch; use Flarum\Core\Search\GambitManager; use Flarum\Core\Search\SearchCriteria; use Flarum\Core\Search\SearchResults; -use Flarum\Core\Users\UserRepositoryInterface; +use Flarum\Core\Users\UserRepository; use Flarum\Core\Users\Events\UserSearchWillBePerformed; /** @@ -21,15 +21,15 @@ class UserSearcher protected $gambits; /** - * @var UserRepositoryInterface + * @var UserRepository */ protected $users; /** * @param GambitManager $gambits - * @param UserRepositoryInterface $users + * @param UserRepository $users */ - public function __construct(GambitManager $gambits, UserRepositoryInterface $users) + public function __construct(GambitManager $gambits, UserRepository $users) { $this->gambits = $gambits; $this->users = $users; diff --git a/framework/core/src/Core/Users/EloquentUserRepository.php b/framework/core/src/Core/Users/UserRepository.php similarity index 62% rename from framework/core/src/Core/Users/EloquentUserRepository.php rename to framework/core/src/Core/Users/UserRepository.php index 1404af5f0..d6d2bb047 100644 --- a/framework/core/src/Core/Users/EloquentUserRepository.php +++ b/framework/core/src/Core/Users/UserRepository.php @@ -2,10 +2,12 @@ use Illuminate\Database\Eloquent\Builder; -class EloquentUserRepository implements UserRepositoryInterface +class UserRepository { /** - * {@inheritdoc} + * Get a new query builder for the users table. + * + * @return \Illuminate\Database\Eloquent\Builder */ public function query() { @@ -13,7 +15,14 @@ class EloquentUserRepository implements UserRepositoryInterface } /** - * {@inheritdoc} + * Find a user by ID, optionally making sure it is visible to a certain + * user, or throw an exception. + * + * @param int $id + * @param User $actor + * @return User + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ public function findOrFail($id, User $actor = null) { @@ -23,7 +32,10 @@ class EloquentUserRepository implements UserRepositoryInterface } /** - * {@inheritdoc} + * Find a user by an identification (username or email). + * + * @param string $identification + * @return User|null */ public function findByIdentification($identification) { @@ -33,7 +45,10 @@ class EloquentUserRepository implements UserRepositoryInterface } /** - * {@inheritdoc} + * Find a user by email. + * + * @param string $email + * @return User|null */ public function findByEmail($email) { @@ -41,7 +56,11 @@ class EloquentUserRepository implements UserRepositoryInterface } /** - * {@inheritdoc} + * Get the ID of a user with the given username. + * + * @param string $username + * @param User|null $actor + * @return integer|null */ public function getIdForUsername($username, User $actor = null) { @@ -51,7 +70,12 @@ class EloquentUserRepository implements UserRepositoryInterface } /** - * {@inheritdoc} + * Find users by matching a string of words against their username, + * optionally making sure they are visible to a certain user. + * + * @param string $string + * @param User|null $actor + * @return array */ public function getIdsForUsername($string, User $actor = null) { diff --git a/framework/core/src/Core/Users/UserRepositoryInterface.php b/framework/core/src/Core/Users/UserRepositoryInterface.php deleted file mode 100644 index 1af4a102d..000000000 --- a/framework/core/src/Core/Users/UserRepositoryInterface.php +++ /dev/null @@ -1,58 +0,0 @@ -app->bind( - 'Flarum\Core\Users\UserRepositoryInterface', - 'Flarum\Core\Users\EloquentUserRepository' - ); - $this->registerAvatarsFilesystem(); $this->registerGambits(); } diff --git a/framework/core/src/Forum/Actions/LoginAction.php b/framework/core/src/Forum/Actions/LoginAction.php index be9761972..7f2230807 100644 --- a/framework/core/src/Forum/Actions/LoginAction.php +++ b/framework/core/src/Forum/Actions/LoginAction.php @@ -2,7 +2,7 @@ use Flarum\Api\Client; use Flarum\Forum\Events\UserLoggedIn; -use Flarum\Core\Users\UserRepositoryInterface; +use Flarum\Core\Users\UserRepository; use Flarum\Support\Action; use Psr\Http\Message\ServerRequestInterface as Request; use Zend\Diactoros\Response\EmptyResponse; @@ -13,7 +13,7 @@ class LoginAction extends Action use WritesRememberCookie; /** - * @var UserRepositoryInterface + * @var UserRepository */ protected $users; @@ -23,10 +23,10 @@ class LoginAction extends Action protected $apiClient; /** - * @param UserRepositoryInterface $users + * @param UserRepository $users * @param Client $apiClient */ - public function __construct(UserRepositoryInterface $users, Client $apiClient) + public function __construct(UserRepository $users, Client $apiClient) { $this->users = $users; $this->apiClient = $apiClient;