diff --git a/src/ComponentModel/Component.php b/src/ComponentModel/Component.php index 6de545c..b3af3df 100644 --- a/src/ComponentModel/Component.php +++ b/src/ComponentModel/Component.php @@ -157,11 +157,10 @@ final public function getParent(): ?IContainer /** * Sets or removes the parent of this component. This method is managed by containers and should * not be called by applications - * @return static * @throws Nette\InvalidStateException * @internal */ - public function setParent(?IContainer $parent, ?string $name = null) + public function setParent(?IContainer $parent, ?string $name = null): static { if ($parent === null && $this->parent === null && $name !== null) { $this->name = $name; // just rename diff --git a/src/ComponentModel/IComponent.php b/src/ComponentModel/IComponent.php index 4c02f92..eb21c97 100644 --- a/src/ComponentModel/IComponent.php +++ b/src/ComponentModel/IComponent.php @@ -30,7 +30,6 @@ function getParent(): ?IContainer; /** * Sets the parent of this component. - * @return static */ - function setParent(?IContainer $parent, ?string $name = null); + function setParent(?IContainer $parent, ?string $name = null): static; }