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,14 +1,9 @@
|
|||
<?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 Pterodactyl\Models\Task;
|
||||
|
||||
interface TaskRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
/**
|
||||
|
@ -19,14 +14,14 @@ interface TaskRepositoryInterface extends RepositoryInterface
|
|||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getTaskWithServer($id);
|
||||
public function getTaskWithServer(int $id): Task;
|
||||
|
||||
/**
|
||||
* Returns the next task in a schedule.
|
||||
*
|
||||
* @param int $schedule the ID of the schedule to select the next task from
|
||||
* @param int $index the index of the current task
|
||||
* @param int $schedule
|
||||
* @param int $index
|
||||
* @return null|\Pterodactyl\Models\Task
|
||||
*/
|
||||
public function getNextTask($schedule, $index);
|
||||
public function getNextTask(int $schedule, int $index);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue