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

@ -12,28 +12,19 @@ use Pterodactyl\Http\Requests\Api\Client\Servers\Files\UploadFileRequest;
class FileUploadController extends ClientApiController
{
/**
* @var \Pterodactyl\Services\Nodes\NodeJWTService
*/
private $jwtService;
/**
* FileUploadController constructor.
*/
public function __construct(
NodeJWTService $jwtService
private NodeJWTService $jwtService
) {
parent::__construct();
$this->jwtService = $jwtService;
}
/**
* Returns a url where files can be uploaded to.
*
* @return \Illuminate\Http\JsonResponse
* Returns an url where files can be uploaded to.
*/
public function __invoke(UploadFileRequest $request, Server $server)
public function __invoke(UploadFileRequest $request, Server $server): JsonResponse
{
return new JsonResponse([
'object' => 'signed_url',
@ -44,11 +35,9 @@ class FileUploadController extends ClientApiController
}
/**
* Returns a url where files can be uploaded to.
*
* @return string
* Returns an url where files can be uploaded to.
*/
protected function getUploadUrl(Server $server, User $user)
protected function getUploadUrl(Server $server, User $user): string
{
$token = $this->jwtService
->setExpiresAt(CarbonImmutable::now()->addMinutes(15))