소스 검색

Merge remote branch 'udat/110425-fixes'

* udat/110425-fixes:
  [Bridge][Twig] removed unused argument passed to setRendered() method
  [Translation] removed unnecessary default parameter value
  [Templating] removed unused argument passed to setRendered() method
  [HttpKernel] removed unused argument passed to ClosureLoader constructor
  [BrowserKit] fixed typo
  [Routing] removed redundant parameter in addRoute method
Fabien Potencier 14 년 전
부모
커밋
0493b669f7

+ 1 - 1
src/Symfony/Bridge/Twig/Extension/FormExtension.php

@@ -166,7 +166,7 @@ class FormExtension extends \Twig_Extension
 
             if (isset($templates[$block])) {
                 if ('widget' === $section || 'row' === $section) {
-                    $view->setRendered(true);
+                    $view->setRendered();
                 }
 
                 return $templates[$block]->renderBlock($block, array_merge($view->all(), $variables));

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php

@@ -116,7 +116,7 @@ class FormHelper extends Helper
         }
 
         if ('widget' === $section || 'row' === $section) {
-            $view->setRendered(true);
+            $view->setRendered();
         }
 
         return $this->render($template, array_merge($view->all(), $variables));

+ 1 - 1
src/Symfony/Component/BrowserKit/CookieJar.php

@@ -81,7 +81,7 @@ class CookieJar
     public function updateFromResponse(Response $response, $uri = null)
     {
         foreach ($response->getHeader('Set-Cookie', false) as $cookie) {
-            $this->set(Cookie::fromString($cookie), $uri);
+            $this->set(Cookie::fromString($cookie, $uri));
         }
     }
 

+ 1 - 1
src/Symfony/Component/HttpKernel/Kernel.php

@@ -597,7 +597,7 @@ abstract class Kernel implements KernelInterface
             new YamlFileLoader($container, $locator),
             new IniFileLoader($container, $locator),
             new PhpFileLoader($container, $locator),
-            new ClosureLoader($container, $locator),
+            new ClosureLoader($container),
         ));
 
         return new DelegatingLoader($resolver);

+ 3 - 3
src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php

@@ -139,17 +139,17 @@ abstract class AnnotationClassLoader implements LoaderInterface
         foreach ($class->getMethods() as $method) {
             if ($annots = $this->reader->getMethodAnnotation($method, $this->routesAnnotationClass)) {
                 foreach ($annots->getRoutes() as $annot) {
-                    $this->addRoute($collection, $annot, $globals, $annot, $class, $method);
+                    $this->addRoute($collection, $annot, $globals, $class, $method);
                 }
             } elseif ($annot = $this->reader->getMethodAnnotation($method, $this->routeAnnotationClass)) {
-                $this->addRoute($collection, $annot, $globals, $annot, $class, $method);
+                $this->addRoute($collection, $annot, $globals, $class, $method);
             }
         }
 
         return $collection;
     }
 
-    protected function addRoute(RouteCollection $collection, $annot, $globals, $annot, \ReflectionClass $class, \ReflectionMethod $method)
+    protected function addRoute(RouteCollection $collection, $annot, $globals, \ReflectionClass $class, \ReflectionMethod $method)
     {
         if (null === $annot->getName()) {
             $annot->setName($this->getDefaultRouteName($class, $method));

+ 1 - 1
src/Symfony/Component/Translation/Translator.php

@@ -37,7 +37,7 @@ class Translator implements TranslatorInterface
      *
      * @api
      */
-    public function __construct($locale = null, MessageSelector $selector)
+    public function __construct($locale, MessageSelector $selector)
     {
         $this->locale = $locale;
         $this->selector = $selector;