Skip to content

Commit ddc4eaa

Browse files
committed
- chore: simplify FQN
1 parent f6593cf commit ddc4eaa

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Mime.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Koded\Stdlib;
1313

14+
use function array_key_exists;
15+
1416
/**
1517
* Helper class Mime.
1618
*
@@ -433,7 +435,9 @@ final class Mime
433435
*/
434436
public static function type(string $extension, int $index = 0): string
435437
{
436-
return self::$extensionsToTypes[$extension][$index] ?? self::$extensionsToTypes[$extension][0] ?? '';
438+
return self::$extensionsToTypes[$extension][$index]
439+
?? self::$extensionsToTypes[$extension][0]
440+
?? '';
437441
}
438442

439443
/**
@@ -457,7 +461,7 @@ public static function types(string $extension): array
457461
*/
458462
public static function supports(string $type): bool
459463
{
460-
return \array_key_exists($type, self::$typesToExtensions);
464+
return array_key_exists($type, self::$typesToExtensions);
461465
}
462466

463467
/**

0 commit comments

Comments
 (0)