Selaa lähdekoodia

[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 14 vuotta sitten
vanhempi
commit
61dc1af65b
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
     }