. */ declare(strict_types=1); namespace FireflyIII\Transformers; use FireflyIII\Models\Attachment; use League\Fractal\TransformerAbstract; /** * Class AttachmentTransformer */ class AttachmentTransformer extends TransformerAbstract { /** * @param Attachment $attachment * * @return array */ public function transform(Attachment $attachment): array { return [ 'id' => (int)$attachment->id, ]; } }