Skip to content

Commit

Permalink
Merge pull request #2806 from mapogolions/maintenance/simplify-prepar…
Browse files Browse the repository at this point in the history
…e-arguments

Simplify prepare of arguments
  • Loading branch information
l0gicgate committed Aug 16, 2019
2 parents 907d149 + 4ddb0a5 commit 335b5fd
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Slim/Routing/Route.php
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 335b5fd

Please sign in to comment.