diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml index 3e049c0f2c..01a271797a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml @@ -17,17 +17,17 @@ - + - + - + @@ -46,13 +46,13 @@ - + - + diff --git a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml index c06a82f06e..bb871f440a 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml +++ b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml @@ -79,7 +79,7 @@ - + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index d074db31bd..44a3ba79d7 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -72,7 +72,6 @@ class TemplateManager public function getTemplates(Profile $profile) { $templates = $this->getNames($profile); - $templates = $this->reorderTemplates($templates); foreach ($templates as $name => $template) { $templates[$name] = $this->twig->loadTemplate($template); @@ -136,49 +135,4 @@ class TemplateManager return false; } - - /** - * It changes the default order of collector templates to show them in a - * different order which is better for design and aesthetic reasons. - * - * @param array $templates - * - * @return array - */ - private function reorderTemplates($templates) - { - $templates = $this->moveArrayElementToFirstPosition($templates, 'twig'); - $templates = $this->moveArrayElementToFirstPosition($templates, 'memory'); - $templates = $this->moveArrayElementToFirstPosition($templates, 'time'); - $templates = $this->moveArrayElementToFirstPosition($templates, 'request'); - - $templates = $this->moveArrayElementToLastPosition($templates, 'config'); - - return $templates; - } - - private function moveArrayElementToFirstPosition($array, $key) - { - if (!array_key_exists($key, $array)) { - return $array; - } - - $value = $array[$key]; - unset($array[$key]); - - return array_merge(array($key => $value), $array); - } - - private function moveArrayElementToLastPosition($array, $key) - { - if (!array_key_exists($key, $array)) { - return $array; - } - - $value = $array[$key]; - unset($array[$key]); - $array[$key] = $value; - - return $array; - } }