Cleanup old objects and add serializer

This commit is contained in:
Tim
2021-10-03 20:44:09 +02:00
parent c823696937
commit 44bd43128b
10 changed files with 3 additions and 714 deletions

View File

@ -6,19 +6,6 @@ namespace Ardent\GrocyApi\Objects;
class ApiListTransformer
{
private static function list(string $type): ?string
{
return match ($type) {
Category::getType() => Category::class,
SingleArticle::getType() => SingleArticle::class,
SingleArticleDetails::getType() => SingleArticleDetails::class,
Order::getType() => Order::class,
OrderLine::getType() => OrderLine::class,
OrderArticle::getType() => OrderArticle::class,
Delivery::getType() => Delivery::class,
default => null,
};
}
public static function getObjects(array $items): array
{