mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 01:33:11 +08:00
Remove usage of Functional\map function
This commit is contained in:
@@ -4,8 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Rest;
|
||||
|
||||
use function array_map;
|
||||
use function Functional\first;
|
||||
use function Functional\map;
|
||||
use function Shlinkio\Shlink\Config\loadConfigFromGlob;
|
||||
use function sprintf;
|
||||
|
||||
@@ -23,11 +23,11 @@ class ConfigProvider
|
||||
public static function applyRoutesPrefix(array $routes): array
|
||||
{
|
||||
$healthRoute = self::buildUnversionedHealthRouteFromExistingRoutes($routes);
|
||||
$prefixedRoutes = map($routes, static function (array $route) {
|
||||
$prefixedRoutes = array_map(static function (array $route) {
|
||||
['path' => $path] = $route;
|
||||
$route['path'] = sprintf('%s%s', self::ROUTES_PREFIX, $path);
|
||||
return $route;
|
||||
});
|
||||
}, $routes);
|
||||
|
||||
return $healthRoute !== null ? [...$prefixedRoutes, $healthRoute] : $prefixedRoutes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user