mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 23:03:45 +02:00
Use more standardized phpcs
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user