Use more standardized phpcs

This commit is contained in:
Dane Everitt 2021-01-23 12:33:34 -08:00
parent a043071e3c
commit c449ca5155
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
493 changed files with 1116 additions and 3903 deletions

View file

@ -8,17 +8,11 @@ use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
class ChmodFilesRequest extends ClientApiRequest implements ClientPermissionsRequest
{
/**
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_UPDATE;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -9,17 +9,12 @@ class CompressFilesRequest extends ClientApiRequest
{
/**
* Checks that the authenticated user is allowed to create archives for this server.
*
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_ARCHIVE;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -8,17 +8,11 @@ use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
class CopyFileRequest extends ClientApiRequest implements ClientPermissionsRequest
{
/**
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_CREATE;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -9,17 +9,12 @@ class CreateFolderRequest extends ClientApiRequest
{
/**
* Checks that the authenticated user is allowed to create files on the server.
*
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_CREATE;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -11,17 +11,12 @@ class DecompressFilesRequest extends ClientApiRequest
* Checks that the authenticated user is allowed to create new files for the server. We don't
* rely on the archive permission here as it makes more sense to make sure the user can create
* additional files rather than make an archive.
*
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_CREATE;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -8,17 +8,11 @@ use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
class DeleteFileRequest extends ClientApiRequest implements ClientPermissionsRequest
{
/**
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_DELETE;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -10,8 +10,6 @@ class DownloadFileRequest extends ClientApiRequest
/**
* Ensure that the user making this request has permission to download files
* from this server.
*
* @return bool
*/
public function authorize(): bool
{

View file

@ -12,17 +12,12 @@ class GetFileContentsRequest extends ClientApiRequest implements ClientPermissio
* Returns the permissions string indicating which permission should be used to
* validate that the authenticated user has permission to perform this action aganist
* the given resource (server).
*
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_READ_CONTENT;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -10,17 +10,12 @@ class ListFilesRequest extends ClientApiRequest
/**
* Check that the user making this request to the API is authorized to list all
* of the files that exist for a given server.
*
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_READ;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -8,9 +8,6 @@ use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
class PullFileRequest extends ClientApiRequest implements ClientPermissionsRequest
{
/**
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_CREATE;

View file

@ -11,17 +11,12 @@ class RenameFileRequest extends ClientApiRequest implements ClientPermissionsReq
/**
* The permission the user is required to have in order to perform this
* request action.
*
* @return string
*/
public function permission(): string
{
return Permission::ACTION_FILE_UPDATE;
}
/**
* @return array
*/
public function rules(): array
{
return [

View file

@ -12,8 +12,6 @@ class WriteFileContentRequest extends ClientApiRequest implements ClientPermissi
* Returns the permissions string indicating which permission should be used to
* validate that the authenticated user has permission to perform this action aganist
* the given resource (server).
*
* @return string
*/
public function permission(): string
{
@ -24,8 +22,6 @@ class WriteFileContentRequest extends ClientApiRequest implements ClientPermissi
* There is no rule here for the file contents since we just use the body content
* on the request to set the file contents. If nothing is passed that is fine since
* it just means we want to set the file to be empty.
*
* @return array
*/
public function rules(): array
{