diff --git a/function.php b/function.php index 3b2ae4c3..cbe5dde4 100644 --- a/function.php +++ b/function.php @@ -3,6 +3,7 @@ defined('APP_PATH') or define('APP_PATH', realpath(__DIR__ . '/../../')); +use Http\Handler\Abstracts\MiddlewareManager; use Http\Handler\Router; use JetBrains\PhpStorm\Pure; use Kiri\Abstracts\Config; @@ -52,6 +53,22 @@ if (!function_exists('make')) { } +if (!function_exists('map')) { + + + /** + * @param array $params + * @param Closure $closure + * @return mixed + */ + function map(array $params, Closure $closure): mixed + { + return array_map($closure, $params); + } + +} + + if (!function_exists('checkPortIsAlready')) {