Upgrade to Laravel 9 (#4413)

Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
Matthew Penner 2022-10-14 10:59:20 -06:00 committed by GitHub
parent 95e15d2c8a
commit cbcf62086f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
573 changed files with 4387 additions and 9411 deletions

View file

@ -1,11 +1,4 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Services\Servers;
@ -20,17 +13,11 @@ class VariableValidatorService
{
use HasUserLevels;
/**
* @var \Illuminate\Contracts\Validation\Factory
*/
private $validator;
/**
* VariableValidatorService constructor.
*/
public function __construct(ValidationFactory $validator)
public function __construct(private ValidationFactory $validator)
{
$this->validator = $validator;
}
/**
@ -42,7 +29,7 @@ class VariableValidatorService
{
$query = EggVariable::query()->where('egg_id', $egg);
if (!$this->isUserLevel(User::USER_LEVEL_ADMIN)) {
// Don't attempt to validate variables if they aren't user editable
// Don't attempt to validate variables if they aren't user editable,
// and we're not running this at an admin level.
$query = $query->where('user_editable', true)->where('user_viewable', true);
}