Skip to content

Commit

Permalink
Simplify prepare of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mapogolions committed Aug 16, 2019
1 parent 907d149 commit 1edc849
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Slim/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,7 @@ public function addMiddleware(MiddlewareInterface $middleware): RouteInterface
*/
public function prepare(array $arguments): RouteInterface
{
// Remove temp arguments
$this->setArguments($this->savedArguments);

// Add the arguments
foreach ($arguments as $k => $v) {
$this->setArgument($k, $v, false);
}

$this->arguments = array_replace($this->savedArguments, $arguments);
return $this;
}

Expand Down

0 comments on commit 1edc849

Please sign in to comment.