Massive PHPCS linting
This commit is contained in:
parent
78c8b8d8ea
commit
3ee5803416
346 changed files with 834 additions and 1424 deletions
|
@ -31,8 +31,8 @@ interface CriteriaInterface
|
|||
/**
|
||||
* Apply selected criteria to a repository call.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param \Pterodactyl\Repositories\Repository $repository
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param \Pterodactyl\Repositories\Repository $repository
|
||||
* @return mixed
|
||||
*/
|
||||
public function apply($model, Repository $repository);
|
||||
|
|
|
@ -29,8 +29,8 @@ interface AllocationRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Set an array of allocation IDs to be assigned to a specific server.
|
||||
*
|
||||
* @param int|null $server
|
||||
* @param array $ids
|
||||
* @param int|null $server
|
||||
* @param array $ids
|
||||
* @return int
|
||||
*/
|
||||
public function assignAllocationsToServer($server, array $ids);
|
||||
|
@ -38,7 +38,7 @@ interface AllocationRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Return all of the allocations for a specific node.
|
||||
*
|
||||
* @param int $node
|
||||
* @param int $node
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function getAllocationsForNode($node);
|
||||
|
|
|
@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
|
|||
|
||||
interface ApiKeyRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
|
@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
|
|||
|
||||
interface ApiPermissionRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ interface SearchableInterface
|
|||
/**
|
||||
* Filter results by search term.
|
||||
*
|
||||
* @param string $term
|
||||
* @param string $term
|
||||
* @return $this
|
||||
*/
|
||||
public function search($term);
|
||||
|
|
|
@ -29,7 +29,7 @@ interface BaseRepositoryInterface
|
|||
/**
|
||||
* Set the node model to be used for this daemon connection.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return $this
|
||||
*/
|
||||
public function setNode($id);
|
||||
|
@ -44,7 +44,7 @@ interface BaseRepositoryInterface
|
|||
/**
|
||||
* Set the UUID for the server to be used in the X-Access-Server header for daemon requests.
|
||||
*
|
||||
* @param null|string $server
|
||||
* @param null|string $server
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccessServer($server = null);
|
||||
|
@ -59,7 +59,7 @@ interface BaseRepositoryInterface
|
|||
/**
|
||||
* Set the token to be used in the X-Access-Token header for requests to the daemon.
|
||||
*
|
||||
* @param null|string $token
|
||||
* @param null|string $token
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccessToken($token = null);
|
||||
|
@ -74,7 +74,7 @@ interface BaseRepositoryInterface
|
|||
/**
|
||||
* Return an instance of the Guzzle HTTP Client to be used for requests.
|
||||
*
|
||||
* @param array $headers
|
||||
* @param array $headers
|
||||
* @return \GuzzleHttp\Client
|
||||
*/
|
||||
public function getHttpClient($headers = []);
|
||||
|
|
|
@ -29,7 +29,7 @@ interface ConfigurationRepositoryInterface extends BaseRepositoryInterface
|
|||
/**
|
||||
* Update the configuration details for the specified node using data from the database.
|
||||
*
|
||||
* @param array $overrides
|
||||
* @param array $overrides
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function update(array $overrides = []);
|
||||
|
|
|
@ -29,9 +29,9 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
|
|||
/**
|
||||
* Create a new server on the daemon for the panel.
|
||||
*
|
||||
* @param int $id
|
||||
* @param array $overrides
|
||||
* @param bool $start
|
||||
* @param int $id
|
||||
* @param array $overrides
|
||||
* @param bool $start
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function create($id, $overrides = [], $start = false);
|
||||
|
@ -39,7 +39,7 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
|
|||
/**
|
||||
* Update server details on the daemon.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function update(array $data);
|
||||
|
@ -47,7 +47,7 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
|
|||
/**
|
||||
* Mark a server to be reinstalled on the system.
|
||||
*
|
||||
* @param array|null $data
|
||||
* @param array|null $data
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function reinstall($data = null);
|
||||
|
|
|
@ -36,7 +36,7 @@ interface DatabaseHostRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Return a database host with the databases and associated servers that are attached to said databases.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -46,7 +46,7 @@ interface DatabaseHostRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Delete a database host from the DB if there are no databases using it.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return bool|null
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
|
|
@ -30,7 +30,7 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
|
|||
* Create a new database if it does not already exist on the host with
|
||||
* the provided details.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -41,8 +41,8 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Create a new database on a given connection.
|
||||
*
|
||||
* @param string $database
|
||||
* @param null|string $connection
|
||||
* @param string $database
|
||||
* @param null|string $connection
|
||||
* @return bool
|
||||
*/
|
||||
public function createDatabase($database, $connection = null);
|
||||
|
@ -50,10 +50,10 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Create a new database user on a given connection.
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $remote
|
||||
* @param string $password
|
||||
* @param null|string $connection
|
||||
* @param string $username
|
||||
* @param string $remote
|
||||
* @param string $password
|
||||
* @param null|string $connection
|
||||
* @return bool
|
||||
*/
|
||||
public function createUser($username, $remote, $password, $connection = null);
|
||||
|
@ -61,10 +61,10 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Give a specific user access to a given database.
|
||||
*
|
||||
* @param string $database
|
||||
* @param string $username
|
||||
* @param string $remote
|
||||
* @param null|string $connection
|
||||
* @param string $database
|
||||
* @param string $username
|
||||
* @param string $remote
|
||||
* @param null|string $connection
|
||||
* @return bool
|
||||
*/
|
||||
public function assignUserToDatabase($database, $username, $remote, $connection = null);
|
||||
|
@ -72,7 +72,7 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Flush the privileges for a given connection.
|
||||
*
|
||||
* @param null|string $connection
|
||||
* @param null|string $connection
|
||||
* @return mixed
|
||||
*/
|
||||
public function flush($connection = null);
|
||||
|
@ -80,8 +80,8 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Drop a given database on a specific connection.
|
||||
*
|
||||
* @param string $database
|
||||
* @param null|string $connection
|
||||
* @param string $database
|
||||
* @param null|string $connection
|
||||
* @return bool
|
||||
*/
|
||||
public function dropDatabase($database, $connection = null);
|
||||
|
@ -89,9 +89,9 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Drop a given user on a specific connection.
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $remote
|
||||
* @param null|string $connection
|
||||
* @param string $username
|
||||
* @param string $remote
|
||||
* @param null|string $connection
|
||||
* @return mixed
|
||||
*/
|
||||
public function dropUser($username, $remote, $connection = null);
|
||||
|
|
|
@ -56,7 +56,7 @@ interface LocationRepositoryInterface extends RepositoryInterface, SearchableInt
|
|||
/**
|
||||
* Return all of the nodes and their respective count of servers for a location.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
|
|
@ -31,7 +31,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return the usage stats for a single node.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getUsageStats($id);
|
||||
|
@ -39,7 +39,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return all available nodes with a searchable interface.
|
||||
*
|
||||
* @param int $count
|
||||
* @param int $count
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public function getNodeListingData($count = 25);
|
||||
|
@ -47,7 +47,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return a single node with location and server information.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -57,7 +57,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return a node with all of the associated allocations and servers that are attached to said allocations.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -67,7 +67,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return a node with all of the servers attached to that node.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -77,7 +77,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return a collection of nodes beloning to a specific location for use on frontend display.
|
||||
*
|
||||
* @param int $location
|
||||
* @param int $location
|
||||
* @return mixed
|
||||
*/
|
||||
public function getNodesForLocation($location);
|
||||
|
|
|
@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
|
|||
|
||||
interface OptionVariableRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ interface PackRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return a pack with the associated server models attached to it.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*
|
||||
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
|
||||
|
@ -49,8 +49,8 @@ interface PackRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return all of the file archives for a given pack.
|
||||
*
|
||||
* @param int $id
|
||||
* @param bool $collection
|
||||
* @param int $id
|
||||
* @param bool $collection
|
||||
* @return object|\Illuminate\Support\Collection
|
||||
*
|
||||
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
|
||||
|
|
|
@ -57,7 +57,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* An array of columns to filter the response by.
|
||||
*
|
||||
* @param array $columns
|
||||
* @param array $columns
|
||||
* @return $this
|
||||
*/
|
||||
public function withColumns($columns = ['*']);
|
||||
|
@ -72,8 +72,8 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Create a new model instance and persist it to the database.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -83,7 +83,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Delete a given record from the database.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return int
|
||||
*/
|
||||
public function delete($id);
|
||||
|
@ -91,7 +91,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Delete records matching the given attributes.
|
||||
*
|
||||
* @param array $attributes
|
||||
* @param array $attributes
|
||||
* @return int
|
||||
*/
|
||||
public function deleteWhere(array $attributes);
|
||||
|
@ -99,7 +99,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Find a model that has the specific ID passed.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -109,7 +109,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Find a model matching an array of where clauses.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param array $fields
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -119,7 +119,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Find and return the first matching instance for the given fields.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param array $fields
|
||||
* @return mixed
|
||||
*/
|
||||
public function findFirstWhere(array $fields);
|
||||
|
@ -127,7 +127,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Return a count of records matching the passed arguments.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param array $fields
|
||||
* @return int
|
||||
*/
|
||||
public function findCountWhere(array $fields);
|
||||
|
@ -135,10 +135,10 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Update a given ID with the passed array of fields.
|
||||
*
|
||||
* @param int $id
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @param int $id
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -150,9 +150,9 @@ interface RepositoryInterface
|
|||
* Perform a mass update where matching records are updated using whereIn.
|
||||
* This does not perform any model data validation.
|
||||
*
|
||||
* @param string $column
|
||||
* @param array $values
|
||||
* @param array $fields
|
||||
* @param string $column
|
||||
* @param array $values
|
||||
* @param array $fields
|
||||
* @return int
|
||||
*/
|
||||
public function updateWhereIn($column, array $values, array $fields);
|
||||
|
@ -160,10 +160,10 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Update a record if it exists in the database, otherwise create it.
|
||||
*
|
||||
* @param array $where
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @param array $where
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -173,8 +173,8 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Update multiple records matching the passed clauses.
|
||||
*
|
||||
* @param array $where
|
||||
* @param array $fields
|
||||
* @param array $where
|
||||
* @param array $fields
|
||||
* @return mixed
|
||||
*/
|
||||
public function massUpdate(array $where, array $fields);
|
||||
|
@ -190,7 +190,7 @@ interface RepositoryInterface
|
|||
* Insert a single or multiple records into the database at once skipping
|
||||
* validation and mass assignment checking.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return bool
|
||||
*/
|
||||
public function insert(array $data);
|
||||
|
@ -198,7 +198,7 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Insert multiple records into the database and ignore duplicates.
|
||||
*
|
||||
* @param array $values
|
||||
* @param array $values
|
||||
* @return bool
|
||||
*/
|
||||
public function insertIgnore(array $values);
|
||||
|
|
|
@ -31,7 +31,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
/**
|
||||
* Returns a listing of all servers that exist including relationships.
|
||||
*
|
||||
* @param int $paginate
|
||||
* @param int $paginate
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAllServers($paginate);
|
||||
|
@ -39,7 +39,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
/**
|
||||
* Return a server model and all variables associated with the server.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -50,8 +50,8 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
* Return all of the server variables possible and default to the variable
|
||||
* default if there is no value defined for the specific server requested.
|
||||
*
|
||||
* @param int $id
|
||||
* @param bool $returnAsObject
|
||||
* @param int $id
|
||||
* @param bool $returnAsObject
|
||||
* @return array|object
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -71,7 +71,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
/**
|
||||
* Return a server as well as associated databases and their hosts.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -81,7 +81,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
/**
|
||||
* Return data about the daemon service in a consumable format.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return array
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
|
|
@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
|
|||
|
||||
interface ServerVariableRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ interface ServiceOptionRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Return a service option with the variables relation attached.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getWithVariables($id);
|
||||
|
@ -37,7 +37,7 @@ interface ServiceOptionRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Return a service option with the copyFrom relation loaded onto the model.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getWithCopyFrom($id);
|
||||
|
@ -45,8 +45,8 @@ interface ServiceOptionRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Confirm a copy script belongs to the same service as the item trying to use it.
|
||||
*
|
||||
* @param int $copyFromId
|
||||
* @param int $service
|
||||
* @param int $copyFromId
|
||||
* @param int $service
|
||||
* @return bool
|
||||
*/
|
||||
public function isCopiableScript($copyFromId, $service);
|
||||
|
|
|
@ -29,7 +29,7 @@ interface ServiceRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Return a service or all services with their associated options, variables, and packs.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getWithOptions($id = null);
|
||||
|
@ -37,7 +37,7 @@ interface ServiceRepositoryInterface extends RepositoryInterface
|
|||
/**
|
||||
* Return a service along with its associated options and the servers relation on those options.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getWithOptionServers($id);
|
||||
|
|
|
@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
|
|||
|
||||
interface ServiceVariableRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ interface UserRepositoryInterface extends RepositoryInterface, SearchableInterfa
|
|||
/**
|
||||
* Return all matching models for a user in a format that can be used for dropdowns.
|
||||
*
|
||||
* @param string $query
|
||||
* @param string $query
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function filterUsersByQuery($query);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue