Initial commit / First Release

This commit is contained in:
Fabián Gonzalo Artur de la Villarmois
2025-12-26 16:51:23 +13:00
parent 2e8f5ce028
commit 2579f561c3
73 changed files with 14521 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Enums;
use Illuminate\Support\Str;
enum NintendoFileExtension: string
{
case NSP = 'nsp';
case NSZ = 'nsz';
case XCI = 'xci';
case XCZ = 'xcz';
/**
* Get all supported file extensions.
*
* @return array<string>
*/
public static function values(): array
{
return array_map(fn($case) => $case->value, self::cases());
}
/**
* Check if a filename has a supported extension.
*/
public static function isSupported(string $filename): bool
{
$extension = Str::lower(Str::afterLast($filename, '.'));
return in_array($extension, self::values(), true);
}
}