Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -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\Http\Requests\Admin\Egg;
|
||||
|
||||
|
@ -13,10 +6,7 @@ use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
|||
|
||||
class EggFormRequest extends AdminFormRequest
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function rules()
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => 'required|string|max:191',
|
||||
|
@ -39,9 +29,6 @@ class EggFormRequest extends AdminFormRequest
|
|||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Contracts\Validation\Validator $validator
|
||||
*/
|
||||
public function withValidator($validator)
|
||||
{
|
||||
$validator->sometimes('config_from', 'exists:eggs,id', function () {
|
||||
|
@ -49,7 +36,7 @@ class EggFormRequest extends AdminFormRequest
|
|||
});
|
||||
}
|
||||
|
||||
public function validated(): array
|
||||
public function validated($key = null, $default = null): array
|
||||
{
|
||||
$data = parent::validated();
|
||||
|
||||
|
|
|
@ -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\Http\Requests\Admin\Egg;
|
||||
|
||||
|
@ -13,10 +6,7 @@ use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
|||
|
||||
class EggImportFormRequest extends AdminFormRequest
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'import_file' => 'bail|required|file|max:1000|mimetypes:application/json,text/plain',
|
||||
|
|
|
@ -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\Http\Requests\Admin\Egg;
|
||||
|
||||
|
@ -14,11 +7,9 @@ use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
|||
class EggScriptFormRequest extends AdminFormRequest
|
||||
{
|
||||
/**
|
||||
* Return the rules to be used when validating the sent data in the request.
|
||||
*
|
||||
* @return array
|
||||
* Return the rules to be used when validating the data sent in the request.
|
||||
*/
|
||||
public function rules()
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'script_install' => 'sometimes|nullable|string',
|
||||
|
|
|
@ -9,10 +9,8 @@ class EggVariableFormRequest extends AdminFormRequest
|
|||
{
|
||||
/**
|
||||
* Define rules for validation of this request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string|min:1|max:191',
|
||||
|
|
Reference in a new issue