Просмотр исходного кода

[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 лет назад
Родитель
Сommit
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;
     }