diff --git a/src/Illuminate/Foundation/Configuration/Middleware.php b/src/Illuminate/Foundation/Configuration/Middleware.php index b729b99badd7..52cf908d61d9 100644 --- a/src/Illuminate/Foundation/Configuration/Middleware.php +++ b/src/Illuminate/Foundation/Configuration/Middleware.php @@ -146,18 +146,18 @@ class Middleware protected $priority = []; /** - * The middleware priority to append. + * The middleware to prepend to the middleware priority definition. * * @var array */ - protected $appendPriority = []; + protected $prependPriority = []; /** - * The middleware priority to prepend. + * The middleware to append to the middleware priority definition. * * @var array */ - protected $prependPriority = []; + protected $appendPriority = []; /** * Prepend middleware to the application's global middleware stack. @@ -415,29 +415,29 @@ public function priority(array $priority) } /** - * Append middleware to the priority middleware. + * Prepend middleware to the priority middleware. * - * @param array|string $after - * @param string $append + * @param array|string $before + * @param string $prepend * @return $this */ - public function appendToPriorityList($after, $append) + public function prependToPriorityList($before, $prepend) { - $this->appendPriority[$append] = $after; + $this->prependPriority[$prepend] = $before; return $this; } /** - * Prepend middleware to the priority middleware. + * Append middleware to the priority middleware. * - * @param array|string $before - * @param string $prepend + * @param array|string $after + * @param string $append * @return $this */ - public function prependToPriorityList($before, $prepend) + public function appendToPriorityList($after, $append) { - $this->prependPriority[$prepend] = $before; + $this->appendPriority[$append] = $after; return $this; } @@ -810,22 +810,22 @@ public function getMiddlewarePriority() } /** - * Get the middleware priority to append. + * Get the middleware to prepend to the middleware priority definition. * * @return array */ - public function getMiddlewarePriorityAppends() + public function getMiddlewarePriorityPrepends() { - return $this->appendPriority; + return $this->prependPriority; } /** - * Get the middleware priority to prepend. + * Get the middleware to append to the middleware priority definition. * * @return array */ - public function getMiddlewarePriorityPrepends() + public function getMiddlewarePriorityAppends() { - return $this->prependPriority; + return $this->appendPriority; } }