Update repository base code to be cleaner and make use of PHP 7 features
This commit is contained in:
parent
0ec5a4e08c
commit
60eb60013c
96 changed files with 1048 additions and 1785 deletions
|
@ -1,16 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Contracts\Repository;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
interface SessionRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Return all of the active sessions for a user.
|
||||
*
|
||||
* @param int $user
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getUserSessions(int $user): Collection;
|
||||
|
||||
/**
|
||||
* Delete a session for a given user.
|
||||
*
|
||||
|
@ -18,13 +21,5 @@ interface SessionRepositoryInterface extends RepositoryInterface
|
|||
* @param int $session
|
||||
* @return null|int
|
||||
*/
|
||||
public function deleteUserSession($user, $session);
|
||||
|
||||
/**
|
||||
* Return all of the active sessions for a user.
|
||||
*
|
||||
* @param int $user
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getUserSessions($user);
|
||||
public function deleteUserSession(int $user, int $session);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue