src/mako/onion/Onion.php
protected function buildLayerClosure(object $layer, Closure $next): Closure
	{
		return function(...$arguments) use ($layer, $next)
		{
			return $layer->execute(...array_merge($arguments, [$next]));
		};
	}
protected function buildLayerClosure(object $layer, Closure $next): Closure
	{
		return function(...$arguments) use ($layer, $next)
		{
			return $layer->execute(...array_merge($arguments, [$next]));
		};
	}
protected function buildLayerClosure ( object $ layer , Closure $ next ) : Closure { return function ( ... $ arguments ) use ( $ layer , $ next ) { return $ layer -> execute ( ... array_merge ( $ arguments , [ $ next ] ) ) ; } ; }
Builds a layer closure.

@param  object   $layer Middleware object
@param  \Closure $next  The next middleware layer
@return \Closure
Builds a layer closure .