Skip to content

Commit 4e51884

Browse files
authored
Added stub for ComponentModel/Container
1 parent 0850a4b commit 4e51884

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

Diff for: extension.neon

+3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ parameters:
77
stubFiles:
88
- stubs/Application/Routers/RouteList.stub
99
- stubs/Application/UI/Component.stub
10+
- stubs/ComponentModel/Component.stub
11+
- stubs/ComponentModel/Container.stub
1012
- stubs/ComponentModel/IComponent.stub
13+
- stubs/ComponentModel/IContainer.stub
1114
- stubs/Database/ResultSet.stub
1215
- stubs/Database/Table/ActiveRow.stub
1316
- stubs/Database/Table/Selection.stub

Diff for: stubs/ComponentModel/Component.stub

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Nette\ComponentModel;
4+
5+
abstract class Component implements IComponent
6+
{
7+
8+
}

Diff for: stubs/ComponentModel/Container.stub

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Nette\ComponentModel;
4+
5+
class Container extends Component implements IContainer
6+
{
7+
8+
/**
9+
* @template T of \Nette\ComponentModel\IComponent
10+
* @phpstan-param null|class-string<T> $filterType
11+
* @phpstan-return ($filterType is null ? \Iterator<int|string, \Nette\ComponentModel\IComponent> : \Iterator<int|string, T>)
12+
*/
13+
public function getComponents(bool $deep = false, string $filterType = null): \Iterator
14+
{
15+
// nothing
16+
}
17+
}

Diff for: stubs/ComponentModel/IContainer.stub

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Nette\ComponentModel;
4+
5+
interface IContainer extends IComponent
6+
{
7+
8+
}

0 commit comments

Comments
 (0)