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

@ -3,6 +3,9 @@
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\Node;
use League\Fractal\Resource\Item;
use League\Fractal\Resource\Collection;
use League\Fractal\Resource\NullResource;
use Pterodactyl\Services\Acl\Api\AdminAcl;
class NodeTransformer extends BaseTransformer
@ -50,11 +53,9 @@ class NodeTransformer extends BaseTransformer
/**
* Return the nodes associated with this location.
*
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
*
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeAllocations(Node $node)
public function includeAllocations(Node $node): Collection|NullResource
{
if (!$this->authorize(AdminAcl::RESOURCE_ALLOCATIONS)) {
return $this->null();
@ -72,11 +73,9 @@ class NodeTransformer extends BaseTransformer
/**
* Return the nodes associated with this location.
*
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
*
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeLocation(Node $node)
public function includeLocation(Node $node): Item|NullResource
{
if (!$this->authorize(AdminAcl::RESOURCE_LOCATIONS)) {
return $this->null();
@ -94,11 +93,9 @@ class NodeTransformer extends BaseTransformer
/**
* Return the nodes associated with this location.
*
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
*
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeServers(Node $node)
public function includeServers(Node $node): Collection|NullResource
{
if (!$this->authorize(AdminAcl::RESOURCE_SERVERS)) {
return $this->null();