Merge branch 'develop' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-01-23 14:39:23 -07:00
commit 8feb87de7c
532 changed files with 4262 additions and 5622 deletions

View file

@ -16,8 +16,6 @@ class LocationTransformer extends BaseTransformer
/**
* Return the resource name for the JSONAPI output.
*
* @return string
*/
public function getResourceName(): string
{
@ -26,9 +24,6 @@ class LocationTransformer extends BaseTransformer
/**
* Return a generic transformed location array.
*
* @param \Pterodactyl\Models\Location $model
* @return array
*/
public function transform(Location $model): array
{
@ -44,14 +39,13 @@ class LocationTransformer extends BaseTransformer
/**
* Return the nodes associated with this location.
*
* @param \Pterodactyl\Models\Location $location
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
*
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeServers(Location $location)
{
if (! $this->authorize(AdminAcl::RESOURCE_SERVERS)) {
if (!$this->authorize(AdminAcl::RESOURCE_SERVERS)) {
return $this->null();
}
@ -63,14 +57,13 @@ class LocationTransformer extends BaseTransformer
/**
* Return the nodes associated with this location.
*
* @param \Pterodactyl\Models\Location $location
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
*
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeNodes(Location $location)
{
if (! $this->authorize(AdminAcl::RESOURCE_NODES)) {
if (!$this->authorize(AdminAcl::RESOURCE_NODES)) {
return $this->null();
}