Переглянути джерело

[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 роки тому
батько
коміт
61dc1af65b
1 змінених файлів з 1 додано та 1 видалено
  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;
     }