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;

View File

@@ -28,12 +28,9 @@ abstract class BaseController extends Controller
// protected $session;
/**
* @param RequestInterface $request
* @param ResponseInterface $response
* @param LoggerInterface $logger
* @return void
*/
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger): void
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
// Load here all helpers you want to be available in your controllers that extend BaseController.
// Caution: Do not put the this below the parent::initController() call below.

View File

@@ -1,5 +1,5 @@
FROM alpine:3.14
MAINTAINER jekkos
LABEL maintainer="jekkos"
ADD database.sql /docker-entrypoint-initdb.d/database.sql
VOLUME /docker-entrypoint-initdb.d

View File

@@ -101,9 +101,11 @@ p.lead {
}
.tabs {
list-style: none inside none;
list-style: none;
list-style-position: inside;
margin: 0;
padding: 0;
margin: 0 0 -1px;
margin-bottom: -1px;
}
.tabs li {
display: inline;