Massive PHPCS linting
This commit is contained in:
parent
78c8b8d8ea
commit
3ee5803416
346 changed files with 834 additions and 1424 deletions
|
@ -82,7 +82,7 @@ class Allocation extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Accessor to automatically provide the IP alias if defined.
|
||||
*
|
||||
* @param null|string $value
|
||||
* @param null|string $value
|
||||
* @return string
|
||||
*/
|
||||
public function getAliasAttribute($value)
|
||||
|
@ -93,7 +93,7 @@ class Allocation extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Accessor to quickly determine if this allocation has an alias.
|
||||
*
|
||||
* @param null|string $value
|
||||
* @param null|string $value
|
||||
* @return bool
|
||||
*/
|
||||
public function getHasAliasAttribute($value)
|
||||
|
|
|
@ -144,7 +144,7 @@ class Node extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Return an instance of the Guzzle client for this specific node.
|
||||
*
|
||||
* @param array $headers
|
||||
* @param array $headers
|
||||
* @return \GuzzleHttp\Client
|
||||
*/
|
||||
public function guzzleClient($headers = [])
|
||||
|
@ -160,7 +160,7 @@ class Node extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Returns the configuration in JSON format.
|
||||
*
|
||||
* @param bool $pretty
|
||||
* @param bool $pretty
|
||||
* @return string
|
||||
*/
|
||||
public function getConfigurationAsJson($pretty = false)
|
||||
|
|
|
@ -107,7 +107,7 @@ class Pack extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Returns all of the archived files for a given pack.
|
||||
*
|
||||
* @param bool $collection
|
||||
* @param bool $collection
|
||||
* @return \Illuminate\Support\Collection|object
|
||||
* @deprecated
|
||||
*/
|
||||
|
|
|
@ -81,7 +81,7 @@ class Permission extends Model
|
|||
'server' => [
|
||||
'set-connection' => null,
|
||||
'view-startup' => null,
|
||||
'edit-startup' => null,
|
||||
'edit-startup' => null,
|
||||
],
|
||||
'sftp' => [
|
||||
'view-sftp' => null,
|
||||
|
@ -118,7 +118,7 @@ class Permission extends Model
|
|||
/**
|
||||
* Return a collection of permissions available.
|
||||
*
|
||||
* @param array $single
|
||||
* @param array $single
|
||||
* @return \Illuminate\Support\Collection|array
|
||||
*/
|
||||
public static function listPermissions($single = false)
|
||||
|
@ -135,8 +135,8 @@ class Permission extends Model
|
|||
/**
|
||||
* Find permission by permission node.
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query
|
||||
* @param string $permission
|
||||
* @param \Illuminate\Database\Query\Builder $query
|
||||
* @param string $permission
|
||||
* @return \Illuminate\Database\Query\Builder
|
||||
*/
|
||||
public function scopePermission($query, $permission)
|
||||
|
@ -147,8 +147,8 @@ class Permission extends Model
|
|||
/**
|
||||
* Filter permission by server.
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Illuminate\Database\Query\Builder $query
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Database\Query\Builder
|
||||
*/
|
||||
public function scopeServer($query, Server $server)
|
||||
|
|
|
@ -155,9 +155,9 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
* DO NOT USE THIS TO MODIFY SERVER DETAILS OR SAVE THOSE DETAILS.
|
||||
* YOU WILL OVERWRITE THE SECRET KEY AND BREAK THINGS.
|
||||
*
|
||||
* @param string $uuid
|
||||
* @param array $with
|
||||
* @param array $withCount
|
||||
* @param string $uuid
|
||||
* @param array $with
|
||||
* @param array $withCount
|
||||
* @return \Pterodactyl\Models\Server
|
||||
* @throws \Exception
|
||||
* @todo Remove $with and $withCount due to cache issues, they aren't used anyways.
|
||||
|
@ -191,7 +191,7 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Returns non-administrative headers for accessing a server on the daemon.
|
||||
*
|
||||
* @param Pterodactyl\Models\User|null $user
|
||||
* @param Pterodactyl\Models\User|null $user
|
||||
* @return array
|
||||
*/
|
||||
public function guzzleHeaders(User $user = null)
|
||||
|
@ -211,7 +211,7 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Return an instance of the Guzzle client for this specific server using defined access token.
|
||||
*
|
||||
* @param Pterodactyl\Models\User|null $user
|
||||
* @param Pterodactyl\Models\User|null $user
|
||||
* @return \GuzzleHttp\Client
|
||||
*/
|
||||
public function guzzleClient(User $user = null)
|
||||
|
@ -222,8 +222,8 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Returns javascript object to be embedded on server view pages with relevant information.
|
||||
*
|
||||
* @param array|null $additional
|
||||
* @param array|null $overwrite
|
||||
* @param array|null $additional
|
||||
* @param array|null $overwrite
|
||||
* @return \Laracasts\Utilities\JavaScript\JavaScriptFacade
|
||||
*/
|
||||
public function js($additional = null, $overwrite = null)
|
||||
|
|
|
@ -90,8 +90,10 @@ class Service extends Model implements CleansAttributes, ValidableContract
|
|||
public function packs()
|
||||
{
|
||||
return $this->hasManyThrough(
|
||||
'Pterodactyl\Models\Pack', 'Pterodactyl\Models\ServiceOption',
|
||||
'service_id', 'option_id'
|
||||
'Pterodactyl\Models\Pack',
|
||||
'Pterodactyl\Models\ServiceOption',
|
||||
'service_id',
|
||||
'option_id'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ class User extends Model implements
|
|||
/**
|
||||
* Enables or disables TOTP on an account if the token is valid.
|
||||
*
|
||||
* @param int $token
|
||||
* @param int $token
|
||||
* @return bool
|
||||
* @deprecated
|
||||
*/
|
||||
|
@ -184,9 +184,8 @@ class User extends Model implements
|
|||
* - at least one lowercase character
|
||||
* - at least one number.
|
||||
*
|
||||
* @param string $password
|
||||
* @param string $regex
|
||||
* @return void
|
||||
* @param string $password
|
||||
* @param string $regex
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @deprecated
|
||||
*/
|
||||
|
@ -203,8 +202,7 @@ class User extends Model implements
|
|||
/**
|
||||
* Send the password reset notification.
|
||||
*
|
||||
* @param string $token
|
||||
* @return void
|
||||
* @param string $token
|
||||
*/
|
||||
public function sendPasswordResetNotification($token)
|
||||
{
|
||||
|
@ -225,7 +223,7 @@ class User extends Model implements
|
|||
/**
|
||||
* Returns the user's daemon secret for a given server.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return null|string
|
||||
*/
|
||||
public function daemonToken(Server $server)
|
||||
|
@ -255,7 +253,7 @@ class User extends Model implements
|
|||
/**
|
||||
* Change the access level for a given call to `access()` on the user.
|
||||
*
|
||||
* @param string $level can be all, admin, subuser, owner
|
||||
* @param string $level can be all, admin, subuser, owner
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccessLevel($level = 'all')
|
||||
|
@ -272,7 +270,7 @@ class User extends Model implements
|
|||
* Returns an array of all servers a user is able to access.
|
||||
* Note: does not account for user admin status.
|
||||
*
|
||||
* @param array $load
|
||||
* @param array $load
|
||||
* @return \Pterodactyl\Models\Server
|
||||
*/
|
||||
public function access(...$load)
|
||||
|
@ -310,7 +308,7 @@ class User extends Model implements
|
|||
/**
|
||||
* Store the username as a lowecase string.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function setUsernameAttribute($value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue