Skip to content

Commit

Permalink
Added stub for ComponentModel/Container
Browse files Browse the repository at this point in the history
  • Loading branch information
lulco authored Jan 17, 2023
1 parent 0850a4b commit 4e51884
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ parameters:
stubFiles:
- stubs/Application/Routers/RouteList.stub
- stubs/Application/UI/Component.stub
- stubs/ComponentModel/Component.stub
- stubs/ComponentModel/Container.stub
- stubs/ComponentModel/IComponent.stub
- stubs/ComponentModel/IContainer.stub
- stubs/Database/ResultSet.stub
- stubs/Database/Table/ActiveRow.stub
- stubs/Database/Table/Selection.stub
Expand Down
8 changes: 8 additions & 0 deletions stubs/ComponentModel/Component.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Nette\ComponentModel;

abstract class Component implements IComponent
{

}
17 changes: 17 additions & 0 deletions stubs/ComponentModel/Container.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Nette\ComponentModel;

class Container extends Component implements IContainer
{

/**
* @template T of \Nette\ComponentModel\IComponent
* @phpstan-param null|class-string<T> $filterType
* @phpstan-return ($filterType is null ? \Iterator<int|string, \Nette\ComponentModel\IComponent> : \Iterator<int|string, T>)
*/
public function getComponents(bool $deep = false, string $filterType = null): \Iterator
{
// nothing
}
}
8 changes: 8 additions & 0 deletions stubs/ComponentModel/IContainer.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Nette\ComponentModel;

interface IContainer extends IComponent
{

}

0 comments on commit 4e51884

Please sign in to comment.