11
0
Fork 0
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:
Alannah Kearney 2019-05-27 00:57:09 +10:00
commit 900f9f2885

View file

@ -74,19 +74,19 @@ class InputCollection
public static function merge(self ...$collections): self
{
$items = [];
$inputs = [];
foreach ($collections as $c) {
foreach ($c->items() as $type => $items) {
foreach ($c->getItems() as $type => $items) {
foreach ($items as $item) {
$items[] = $item;
$inputs[] = $item;
}
}
}
$mergedCollection = new self();
foreach ($items as $input) {
foreach ($inputs as $input) {
try {
$mergedCollection->append($input, true);
} catch (\Exception $ex) {