Skip to content

Commit 6e7980f

Browse files
committed
fixed types
1 parent 33e1e42 commit 6e7980f

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/ComponentModel/Component.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ abstract class Component implements IComponent
2222
{
2323
use Nette\SmartObject;
2424

25-
/** @var IContainer */
25+
/** @var IContainer|null */
2626
private $parent;
2727

28-
/** @var string */
28+
/** @var string|null */
2929
private $name;
3030

3131
/** @var array of [type => [obj, depth, path, array of [attached, detached]]] */

src/ComponentModel/Container.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Container extends Component implements IContainer
2020
/** @var IComponent[] */
2121
private $components = [];
2222

23-
/** @var IComponent|null */
23+
/** @var Container|null */
2424
private $cloning;
2525

2626

@@ -29,7 +29,7 @@ class Container extends Component implements IContainer
2929

3030
/**
3131
* Adds the component to the container.
32-
* @param string|int $name
32+
* @param string|int|null $name
3333
* @param string|int $insertBefore
3434
* @return static
3535
* @throws Nette\InvalidStateException
@@ -234,7 +234,7 @@ public function __clone()
234234

235235
/**
236236
* Is container cloning now?
237-
* @return IComponent|null
237+
* @return Container|null
238238
* @internal
239239
*/
240240
public function _isCloning()

src/ComponentModel/IContainer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface IContainer extends IComponent
1515
{
1616
/**
1717
* Adds the component to the container.
18-
* @param string|int $name
18+
* @param string|int|null $name
1919
* @return static
2020
*/
2121
function addComponent(IComponent $component, $name);
@@ -35,9 +35,7 @@ function getComponent($name);
3535

3636
/**
3737
* Iterates over descendants components.
38-
* @param bool $deep
39-
* @param string $filterType
4038
* @return \Iterator
4139
*/
42-
function getComponents($deep = false, $filterType = null);
40+
function getComponents();
4341
}

0 commit comments

Comments
 (0)