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

@ -13,11 +13,9 @@ use Pterodactyl\Http\Requests\Api\Client\Account\StoreApiKeyRequest;
class ApiKeyController extends ClientApiController
{
/**
* Returns all of the API keys that exist for the given client.
*
* @return array
* Returns all the API keys that exist for the given client.
*/
public function index(ClientApiRequest $request)
public function index(ClientApiRequest $request): array
{
return $this->fractal->collection($request->user()->apiKeys)
->transformWith($this->getTransformer(ApiKeyTransformer::class))
@ -26,6 +24,8 @@ class ApiKeyController extends ClientApiController
/**
* Store a new API key for a user's account.
*
* @throws \Pterodactyl\Exceptions\DisplayException
*/
public function store(StoreApiKeyRequest $request): array
{
@ -51,10 +51,8 @@ class ApiKeyController extends ClientApiController
/**
* Deletes a given API key.
*
* @return \Illuminate\Http\JsonResponse
*/
public function delete(ClientApiRequest $request, string $identifier)
public function delete(ClientApiRequest $request, string $identifier): JsonResponse
{
/** @var \Pterodactyl\Models\ApiKey $key */
$key = $request->user()->apiKeys()