File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -178,12 +178,13 @@ protected function createComponent(string $name): ?IComponent
178178
179179
180180 /**
181- * Iterates over descendants components.
182- * @return iterable <int|string,IComponent>
181+ * Returns immediate child components.
182+ * @return array <int|string,IComponent>
183183 */
184- final public function getComponents (bool $ deep = false , ? string $ filterType = null ): iterable
184+ final public function getComponents (): iterable
185185 {
186- if ($ deep ) {
186+ $ filterType = func_get_args ()[1 ] ?? null ;
187+ if (func_get_args ()[0 ] ?? null ) { // back compatibility
187188 $ iterator = new RecursiveComponentIterator ($ this ->components );
188189 $ iterator = new \RecursiveIteratorIterator ($ iterator , \RecursiveIteratorIterator::SELF_FIRST );
189190 if ($ filterType ) {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ function removeComponent(IComponent $component): void;
3535 function getComponent (string $ name ): ?IComponent ;
3636
3737 /**
38- * Iterates over descendants components.
39- * @return iterable <int|string,IComponent>
38+ * Returns immediate child components.
39+ * @return array <int|string,IComponent>
4040 */
4141 function getComponents (): iterable ;
4242}
You can’t perform that action at this time.
0 commit comments