Use a standardized transformer base; replace all client transformers to call that base
This commit is contained in:
parent
2203a4d87e
commit
cf500a1a54
25 changed files with 255 additions and 379 deletions
|
@ -3,21 +3,16 @@
|
|||
namespace Pterodactyl\Transformers\Api\Client;
|
||||
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Pterodactyl\Transformers\Api\Transformer;
|
||||
|
||||
class EggTransformer extends BaseClientTransformer
|
||||
class EggTransformer extends Transformer
|
||||
{
|
||||
/**
|
||||
* Return the resource name for the JSONAPI output.
|
||||
*/
|
||||
public function getResourceName(): string
|
||||
{
|
||||
return Egg::RESOURCE_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Egg $egg)
|
||||
public function transform(Egg $egg): array
|
||||
{
|
||||
return [
|
||||
'uuid' => $egg->uuid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue