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
|
@ -11,15 +11,9 @@ use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
|||
|
||||
class StoreServerRequest extends ApplicationApiRequest
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $resource = AdminAcl::RESOURCE_SERVERS;
|
||||
protected ?string $resource = AdminAcl::RESOURCE_SERVERS;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $permission = AdminAcl::WRITE;
|
||||
protected int $permission = AdminAcl::WRITE;
|
||||
|
||||
/**
|
||||
* Rules to be applied to this request.
|
||||
|
@ -73,10 +67,8 @@ class StoreServerRequest extends ApplicationApiRequest
|
|||
|
||||
/**
|
||||
* Normalize the data into a format that can be consumed by the service.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function validated()
|
||||
public function validated($key = null, $default = null): array
|
||||
{
|
||||
$data = parent::validated();
|
||||
|
||||
|
@ -119,7 +111,7 @@ class StoreServerRequest extends ApplicationApiRequest
|
|||
$query->whereNull('server_id');
|
||||
}),
|
||||
], function ($input) {
|
||||
return !($input->deploy);
|
||||
return !$input->deploy;
|
||||
});
|
||||
|
||||
$validator->sometimes('allocation.additional.*', [
|
||||
|
@ -128,7 +120,7 @@ class StoreServerRequest extends ApplicationApiRequest
|
|||
$query->whereNull('server_id');
|
||||
}),
|
||||
], function ($input) {
|
||||
return !($input->deploy);
|
||||
return !$input->deploy;
|
||||
});
|
||||
|
||||
$validator->sometimes('deploy.locations', 'present', function ($input) {
|
||||
|
@ -142,10 +134,8 @@ class StoreServerRequest extends ApplicationApiRequest
|
|||
|
||||
/**
|
||||
* Return a deployment object that can be passed to the server creation service.
|
||||
*
|
||||
* @return \Pterodactyl\Models\Objects\DeploymentObject|null
|
||||
*/
|
||||
public function getDeploymentObject()
|
||||
public function getDeploymentObject(): ?DeploymentObject
|
||||
{
|
||||
if (is_null($this->input('deploy'))) {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue