Ver Fonte

[Form] Refer to FormView explicitly in its own getParent() type-hint

Using "self" makes mocking impossible, as the type-hint would then refer to the extending class and make the declaration incompatible.

Jeremy Mikola há 14 anos atrás
pai
commit
61dc1af65b
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/Symfony/Component/Form/FormView.php

+ 1 - 1
src/Symfony/Component/Form/FormView.php

@@ -120,7 +120,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
      *
      * @param FormView $parent The parent view
      */
-    public function setParent(self $parent = null)
+    public function setParent(FormView $parent = null)
     {
         $this->parent = $parent;
     }