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

@ -14,7 +14,6 @@ trait HasUserLevels
/**
* Set the access level for running this function.
*
* @param int $level
* @return $this
*/
public function setUserLevel(int $level)
@ -26,8 +25,6 @@ trait HasUserLevels
/**
* Determine which level this function is running at.
*
* @return int
*/
public function getUserLevel(): int
{
@ -36,9 +33,6 @@ trait HasUserLevels
/**
* Determine if the current user level is set to a specific level.
*
* @param int $level
* @return bool
*/
public function isUserLevel(int $level): bool
{

View file

@ -22,8 +22,6 @@ trait ReturnsUpdatedModels
* for API calls, but is unnecessary for UI based updates where the page is
* being reloaded and a fresh model will be pulled anyways.
*
* @param bool $toggle
*
* @return $this
*/
public function returnUpdatedModel(bool $toggle = true)

View file

@ -9,9 +9,6 @@ use Pterodactyl\Exceptions\Service\Egg\Variable\BadValidationRuleException;
trait ValidatesValidationRules
{
/**
* @return \Illuminate\Contracts\Validation\Factory
*/
abstract protected function getValidator(): Factory;
/**
@ -29,9 +26,7 @@ trait ValidatesValidationRules
} catch (BadMethodCallException $exception) {
$matches = [];
if (preg_match('/Method \[(.+)\] does not exist\./', $exception->getMessage(), $matches)) {
throw new BadValidationRuleException(trans('exceptions.nest.variables.bad_validation_rule', [
'rule' => Str::snake(str_replace('validate', '', array_get($matches, 1, 'unknownRule'))),
]), $exception);
throw new BadValidationRuleException(trans('exceptions.nest.variables.bad_validation_rule', ['rule' => Str::snake(str_replace('validate', '', array_get($matches, 1, 'unknownRule')))]), $exception);
}
throw $exception;