mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Use more standardized phpcs
This commit is contained in:
@@ -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