Skip to content

Commit

Permalink
fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 20, 2018
1 parent 33e1e42 commit 6e7980f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/ComponentModel/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]]] */
Expand Down
6 changes: 3 additions & 3 deletions src/ComponentModel/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Container extends Component implements IContainer
/** @var IComponent[] */
private $components = [];

/** @var IComponent|null */
/** @var Container|null */
private $cloning;


Expand All @@ -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
Expand Down Expand Up @@ -234,7 +234,7 @@ public function __clone()

/**
* Is container cloning now?
* @return IComponent|null
* @return Container|null
* @internal
*/
public function _isCloning()
Expand Down
6 changes: 2 additions & 4 deletions src/ComponentModel/IContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
}

0 comments on commit 6e7980f

Please sign in to comment.