From 7569ee2964e35bfe5e7947d55227c22acf52fa84 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Mon, 12 Nov 2012 17:54:27 +0100 Subject: [PATCH] [Routing] removed irrelevant string cast in Route Even if the passed key is an integer, casting to string won't make any difference in array keys (it remains an int key). --- src/Symfony/Component/Routing/Route.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 8f33b41eaa..97c97f4b5b 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -143,7 +143,7 @@ class Route implements \Serializable public function addOptions(array $options) { foreach ($options as $name => $option) { - $this->options[(string) $name] = $option; + $this->options[$name] = $option; } $this->compiled = null; @@ -220,7 +220,7 @@ class Route implements \Serializable public function addDefaults(array $defaults) { foreach ($defaults as $name => $default) { - $this->defaults[(string) $name] = $default; + $this->defaults[$name] = $default; } $this->compiled = null; @@ -263,7 +263,7 @@ class Route implements \Serializable */ public function setDefault($name, $default) { - $this->defaults[(string) $name] = $default; + $this->defaults[$name] = $default; $this->compiled = null; return $this;