<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Presenters;

use League\Fractal\Serializer\ArraySerializer;

/**
 * Class SummarySerializer
 *
 * @package Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Presenters
 */
class SummarySerializer extends ArraySerializer
{
    /**
     * Serialize a collection.
     *
     * @param string $resourceKey
     * @param array  $data
     *
     * @return array
     */
    public function collection($resourceKey, array $data): array
    {
        return $data;
    }

    /**
     * Serialize an item.
     *
     * @param string $resourceKey
     * @param array  $data
     *
     * @return array
     */
    public function item($resourceKey, array $data): array
    {
        return $data;
    }

    /**
     * Serialize null resource.
     *
     * @return array
     */
    public function null(): array
    {
        return [];
    }
}
