fix some issues

Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
2025-04-30 04:12:54 +02:00
parent 4b23f6ddbb
commit 235918f0c0
7 changed files with 9 additions and 64 deletions

View File

@@ -4,9 +4,8 @@ namespace Anikeen\Id\Resources;
use Anikeen\Id\Concerns\MagicProperties;
use Anikeen\Id\Result;
use JsonSerializable;
abstract class BaseResource implements JsonSerializable
abstract class BaseResource
{
use MagicProperties;
@@ -14,20 +13,4 @@ abstract class BaseResource implements JsonSerializable
{
$this->setMagicProperties($this->result->data);
}
/**
* Returns the collection of resources as an array.
*/
public function toArray(): array
{
return (array) $this->result->data;
}
/**
* Returns the collection of resources as a JSON string.
*/
public function jsonSerialize(): array
{
return $this->toArray();
}
}