Skip to content

Commit

Permalink
[Routing] removed irrelevant string cast in Route
Browse files Browse the repository at this point in the history
Even if the passed key is an integer, casting to string won't make any difference in array keys (it remains an int key).
  • Loading branch information
Tobion committed Nov 12, 2012
1 parent 938670d commit 7569ee2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Component/Routing/Route.php
Expand Up @@ -143,7 +143,7 @@ public function setOptions(array $options)
public function addOptions(array $options)
{
foreach ($options as $name => $option) {
$this->options[(string) $name] = $option;
$this->options[$name] = $option;
}
$this->compiled = null;

Expand Down Expand Up @@ -220,7 +220,7 @@ public function setDefaults(array $defaults)
public function addDefaults(array $defaults)
{
foreach ($defaults as $name => $default) {
$this->defaults[(string) $name] = $default;
$this->defaults[$name] = $default;
}
$this->compiled = null;

Expand Down Expand Up @@ -263,7 +263,7 @@ public function hasDefault($name)
*/
public function setDefault($name, $default)
{
$this->defaults[(string) $name] = $default;
$this->defaults[$name] = $default;
$this->compiled = null;

return $this;
Expand Down

0 comments on commit 7569ee2

Please sign in to comment.