mirror of
https://github.com/n3w/helpers-cli-input.git
synced 2025-12-19 12:43:23 +00:00
Fixed misnamed variable in InputCollection::merge()
This commit is contained in:
parent
ad21e667c3
commit
900f9f2885
1 changed files with 4 additions and 4 deletions
|
|
@ -74,19 +74,19 @@ class InputCollection
|
||||||
|
|
||||||
public static function merge(self ...$collections): self
|
public static function merge(self ...$collections): self
|
||||||
{
|
{
|
||||||
$items = [];
|
$inputs = [];
|
||||||
|
|
||||||
foreach ($collections as $c) {
|
foreach ($collections as $c) {
|
||||||
foreach ($c->items() as $type => $items) {
|
foreach ($c->getItems() as $type => $items) {
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
$items[] = $item;
|
$inputs[] = $item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mergedCollection = new self();
|
$mergedCollection = new self();
|
||||||
|
|
||||||
foreach ($items as $input) {
|
foreach ($inputs as $input) {
|
||||||
try {
|
try {
|
||||||
$mergedCollection->append($input, true);
|
$mergedCollection->append($input, true);
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue