8000 merged branch Tobion/patch-2 (PR #5997) · symfony/symfony@7b4a278 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b4a278

Browse files
committed
merged branch Tobion/patch-2 (PR #5997)
This PR was merged into the 2.1 branch. Commits ------- 7569ee2 [Routing] removed irrelevant string cast in Route Discussion ---------- [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).
2 parents 938670d + 7569ee2 commit 7b4a278

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Routing/Route.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function setOptions(array $options)
143143
public function addOptions(array $options)
144144
{
145145
foreach ($options as $name => $option) {
146-
$this->options[(string) $name] = $option;
146+
$this->options[$name] = $option;
147147
}
148148
$this->compiled = null;
149149

@@ -220,7 +220,7 @@ public function setDefaults(array $defaults)
220220
public function addDefaults(array $defaults)
221221
{
222222
foreach ($defaults as $name => $default) {
223-
$this->defaults[(string) $name] = $default;
223+
$this->defaults[$name] = $default;
224224
}
225225
$this->compiled = null;
226226

@@ -263,7 +263,7 @@ public function hasDefault($name)
263263
*/
264264
public function setDefault($name, $default)
265265
{
266-
$this->defaults[(string) $name] = $default;
266+
$this->defaults[$name] = $default;
267267
$this->compiled = null;
268268

269269
return $this;

0 commit comments

Comments
 (0)
0