protected function moveMiddleware(array $middleware, int $from, int $to): array
    {
        \array_splice($middleware, $to, 0, $middleware[$from]);

        unset($middleware[$from + 1]);

        return $middleware;
    }