diff --git a/src/ComponentModel/Component.php b/src/ComponentModel/Component.php index d093570..d80cad8 100644 --- a/src/ComponentModel/Component.php +++ b/src/ComponentModel/Component.php @@ -22,10 +22,10 @@ abstract class Component implements IComponent { use Nette\SmartObject; - /** @var IContainer */ + /** @var IContainer|null */ private $parent; - /** @var string */ + /** @var string|null */ private $name; /** @var array of [type => [obj, depth, path, array of [attached, detached]]] */ diff --git a/src/ComponentModel/Container.php b/src/ComponentModel/Container.php index 2e38c06..a7bc18c 100644 --- a/src/ComponentModel/Container.php +++ b/src/ComponentModel/Container.php @@ -20,7 +20,7 @@ class Container extends Component implements IContainer /** @var IComponent[] */ private $components = []; - /** @var IComponent|null */ + /** @var Container|null */ private $cloning; @@ -29,7 +29,7 @@ class Container extends Component implements IContainer /** * Adds the component to the container. - * @param string|int $name + * @param string|int|null $name * @param string|int $insertBefore * @return static * @throws Nette\InvalidStateException @@ -234,7 +234,7 @@ public function __clone() /** * Is container cloning now? - * @return IComponent|null + * @return Container|null * @internal */ public function _isCloning() diff --git a/src/ComponentModel/IContainer.php b/src/ComponentModel/IContainer.php index 0144f7a..293d495 100644 --- a/src/ComponentModel/IContainer.php +++ b/src/ComponentModel/IContainer.php @@ -15,7 +15,7 @@ interface IContainer extends IComponent { /** * Adds the component to the container. - * @param string|int $name + * @param string|int|null $name * @return static */ function addComponent(IComponent $component, $name); @@ -35,9 +35,7 @@ function getComponent($name); /** * Iterates over descendants components. - * @param bool $deep - * @param string $filterType * @return \Iterator */ - function getComponents($deep = false, $filterType = null); + function getComponents(); }