Skip to content

Commit

Permalink
Fix methods not returning $this.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jul 27, 2016
1 parent 06a9763 commit b4f1dd1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Http/MiddlewareQueue.php
Expand Up @@ -95,7 +95,9 @@ protected function resolve($index)
public function add($middleware)
{
if (is_array($middleware)) {
return $this->queue = array_merge($this->queue, $middleware);
$this->queue = array_merge($this->queue, $middleware);

return $this;
}

$this->queue[] = $middleware;
Expand Down Expand Up @@ -124,7 +126,9 @@ public function push($middleware)
public function prepend($middleware)
{
if (is_array($middleware)) {
return $this->queue = array_merge($middleware, $this->queue);
$this->queue = array_merge($middleware, $this->queue);

return $this;
}

array_unshift($this->queue, $middleware);
Expand Down

0 comments on commit b4f1dd1

Please sign in to comment.