<?php

namespace AutoAdmin\Bundle\Content\Duplicator;

use AutoAdmin\Bundle\Content\Model\LocaleInterface;

class LocaleEntityDuplicator extends AbstractDuplicator
{
    /**
     * @return string[]
     */
    public function supportInterfaces(): array
    {
        return [
            LocaleInterface::class
        ];
    }

    /**
     * @param LocaleInterface $entity
     * @param LocaleInterface $duplicate
     *
     * @return LocaleInterface
     */
    public function duplicate(object $entity, object $duplicate, ?object $parent = null): object
    {
        $duplicate->setCode($entity->getCode());

        return $duplicate;
    }
}
