<?php

namespace AutoAdmin\Bundle\Media\Helper;

class FileHelper
{
    public static function extractExtension($fileName): ?string
    {
        $exploded = explode('.', $fileName);
        return array_pop($exploded);
    }

    public static function extractName($fileName): string
    {
        $exploded = explode('.', $fileName);
        array_pop($exploded);
        return implode('-', $exploded);
    }
}