private function applyMiddleware(array $configuration): array
    {
        foreach ($this->middlewares as $middleware) {
            $configuration = $middleware($configuration);
        }

        return $configuration;
    }
private function applyMiddleware(array $configuration): array
    {
        foreach ($this->middlewares as $middleware) {
            $configuration = $middleware($configuration);
        }

        return $configuration;
    }
private function applyMiddleware ( array $ configuration ) : array { foreach ( $ this -> middlewares as $ middleware ) { $ configuration = $ middleware ( $ configuration ) ; } return $ configuration ; }
Applies all middleware callbacks onto the configuration.

@param array $configuration

@return array
Applies all middleware callbacks onto the configuration .