chore: sync project files to match upstream templates (#4537)

- updated some files to match the official CodeIgniter 4 skeleton.
- rebuilt package.json from a clean init and modernized metadata and formatting
- rebuilt composer.json with modernized metadata and formatting
- replaced code of conduct text with markdown
- updated Dockerfile to replace deprecated instruction
This commit is contained in:
BudsieBuds
2026-05-12 15:55:36 +02:00
committed by GitHub
parent 144e73eba6
commit ef91e6a9df
10 changed files with 128 additions and 138 deletions

View File

@@ -486,10 +486,9 @@ class Mimes
/**
* Attempts to determine the best mime type for the given file extension.
*
* @param string $extension
* @return array|string|null The mime type found, or none if unable to determine.
* @return string|null The mime type found, or none if unable to determine.
*/
public static function guessTypeFromExtension(string $extension): array|string|null
public static function guessTypeFromExtension(string $extension)
{
$extension = trim(strtolower($extension), '. ');
@@ -507,7 +506,7 @@ class Mimes
*
* @return string|null The extension determined, or null if unable to match.
*/
public static function guessExtensionFromType(string $type, ?string $proposedExtension = null): ?string
public static function guessExtensionFromType(string $type, ?string $proposedExtension = null)
{
$type = trim(strtolower($type), '. ');
@@ -523,7 +522,7 @@ class Mimes
}
// Reverse check the mime type list if no extension was proposed.
// This search is order-sensitive!
// This search is order sensitive!
foreach (static::$mimes as $ext => $types) {
if (in_array($type, (array) $types, true)) {
return $ext;