Updated the project for PHP 7.4+ compatibility.

This commit is contained in:
2026-05-31 12:54:12 +03:30
parent a8a5065553
commit 2703e956da
5 changed files with 23 additions and 18 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ if (!function_exists('view')) {
}
if (!function_exists('dd')) {
function dd(): never
function dd(): void
{
echo '<pre>';
array_map(function ($arg) {
@@ -32,7 +32,7 @@ function setup_configs(): void
setup_configs();
if (!function_exists('config')) {
function config(string $key, ?string $default = null): null|string|array
function config(string $key, ?string $default = null)
{
$value = MAHAK_CASHED_CONFIG;
foreach (explode('.', $key) as $key) {
@@ -44,7 +44,7 @@ if (!function_exists('config')) {
if (!function_exists('get_configured_option')) {
function get_configured_option(string $key, ?string $default = null): null|string|array
function get_configured_option(string $key, ?string $default = null)
{
return get_option(config("mahak.options.$key"), $default);
}