Prechádzať zdrojové kódy

[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 rokov pred
rodič
commit
61dc1af65b
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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;
     }