Updated the project for PHP 7.4+ compatibility.
This commit is contained in:
+3
-3
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user