<?php

namespace App\VichUploader\DirectoryNamer\Account;

use App\Entity\Account;
use Vich\UploaderBundle\Mapping\PropertyMapping;
use Vich\UploaderBundle\Naming\DirectoryNamerInterface;

class AvatarName implements DirectoryNamerInterface
{

    public function directoryName(object|array $object, PropertyMapping $mapping): string
    {
        /** @var Account $account */
        $account = $object;
        return $account->getId();
    }
}
