Skip to content

Commit

Permalink
Container::getComponents() parameters are silently deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 10, 2023
1 parent b31c881 commit 5a6b592
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ComponentModel/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ protected function createComponent(string $name): ?IComponent
* Returns array of components.
* @return iterable<int|string,IComponent>
*/
final public function getComponents(bool $deep = false, ?string $filterType = null): iterable
final public function getComponents(): iterable
{
if ($deep) {
$filterType = func_get_args()[1] ?? null;
if (func_get_args()[0] ?? null) {
$iterator = new RecursiveComponentIterator($this->components);
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
if ($filterType) {
Expand Down

0 comments on commit 5a6b592

Please sign in to comment.