Return string for adding all foreign keys

@param array $items
@return array
164017
protected function getItems(array $items)
	{
		$result = array();
		foreach($items as $item) {
			$result[] = $this->getItem($item);
		}
		return $result;
	}
29349
private function tracksIds(array $items): array
    {
        $_ = [];
        foreach ($items as $item)
        {
            $_[] = sprintf('%d_%d', $item[1], $item[0]);
        }

        return $_;
    }
990029
protected function map( array $items )
	{
		$list = [];

		foreach( $items as $item ) {
			$list[$item->getCode()] = $item;
		}

		return $list;
	}
757110
protected function getArrayableItems($items)
		{
			if ($items instanceof self) {
				$items = $items->all();
			} elseif ($items instanceof Arrayable) {
				$items = $items->toArray();
			}

			return $items;
		}
692659
protected function hydrateLineItems($items)
    {
        $result = array();
        if ($items == null) {
            return $result;
        }

        foreach ($items as $i => $item) {
            $result = array_merge(
                $result,
                array(
                    'Item_Name_'     . $i => $item->name,
                    'Item_Desc_'     . $i => $item->description,
                    'Item_Price_'    . $i => $this->formatAmount($item->amount),
                    'Item_Quantity_' . $i => $item->quantity,
                    'Item_SKU_'      . $i => $item->number,
                )
            );
        }

        return $result;
    }
1160957
public function createArray(array $items): Array_
    {
        $arrayItems = [];

        foreach ($items as $item) {
            $arrayItems[] = $this->createArrayItem($item);
        }

        return new Array_($arrayItems);
    }
43032
protected function getValues($item, array $keys)
    {
        $values = [];
        foreach ($keys as $key) {
            $values[] = Vale::get($item, $key);
        }

        return $values;
    }
984509
public function getUsers($items)
  {
    $result = [];
    foreach ($items as $item) {
      $result[] = new User($item);
    }

    return $result;
  }
275062
protected function filterItems(array $items)
    {
        $data = [];

        foreach ($items as $item) {
            $item = trim($item);

            if (empty($item)) {
                continue;
            }

            $item = $this->removeChar($item, '[', ']');

            if ($this->itemIsSerialized($item)) {
                $data[] = unserialize($item);
                continue;
            }

            if (strpos($item, '=>') !== false) {
                $element = explode('=>', $item);
                $element[0] = trim($element[0]);
                $element[1] = trim($element[1]);

                $key = $this->removeChar($element[0], ['"', "'"], ['"', "'"]);
                $val = $this->removeChar($element[1], ['"', "'"], ['"', "'"]);

                $data[$key] = $val;
            } else {
                $data[] = $this->removeChar($item, ['"', "'"], ['"', "'"]);
            }
        }

        return $data;
    }
287237
public static function fromArray(array $items) : Collection
	{
		$obj = new static($items);
		foreach ($items as $key => $item) {
			$obj->__set($key, $item);
		}
		return $obj;
	}
525988
public function append($items)
    {
        return new ResultScan(array_merge($this->buffered()->toArray(), $this->parseItems($items)));
    }
968139
public function itemsToFormat(array $items): string
    {
        return $this->strToCSV(array_map(function (Item $item) {
            return [
                $item->getId(),
                $item->getType(),
                json_encode($item->getMetadata()),
                json_encode($item->getIndexedMetadata()),
                json_encode($item->getSearchableMetadata()),
                json_encode($item->getExactMatchingMetadata()),
                json_encode($item->getSuggest()),
                json_encode(
                    ($item->getCoordinate() instanceof Coordinate)
                        ? $item->getCoordinate()->toArray()
                        : null
                ),
            ];
        }, $items));
    }
495197
private function buildMenuItems(array $items)
    {
        $html = '';

        foreach ($items as $item) {

            if ($this->multilevel && $item->hasChilds()) {
                $html .= '
				<li class="navbar-parent">
					<a href="' . $item->getUrl() . '">' . $item->getText() . '</a>
					<ul>';

                $html .= $this->buildMenuItems($item->getChilds());

                $html .= '
					</ul>
				</li>';
            } else {

                $url = $item->getUrl();

                if ($url) {
                    $html .= '<li><a href="' . $url . '">' . $item->getText() . '</a></li>';
                } else {
                    $html .= '<li><a href="#" onClick="return false">' . $item->getText() . '</a></li>';
                }
            }
        }

        return $html;
    }
1216228
public function add($items)
    {
        if (is_array($items)) {
            $this->collection[] = new RecordField($items);
        } elseif (is_object($items) && $items instanceof RecordField) {
            $this->collection[] = $items;
        }

        return $this;
    }
1166136
protected function processItems(array $items)
    {
        $processedItems = [];

        foreach ($items as $entry) {
            $processedItems[] = new Account($entry);
        }

        return $processedItems;
    }
83894
public function add( ...$items )
	{
		foreach ( $items as &$item ) $item = (array)$item;
		$this->items = array_merge( $this->items , ...$items );
		return $this;
	}
465480
protected function prepareTableRows($items) {
        $tableRows = [];
        foreach ($items as $key => $value) {
            if (is_object($value) && method_exists($value, '__toString')) {
                $value = (string) $value;
            } elseif (is_array($value) || is_object($value)) {
                $value = Yaml::dump($value);
            } elseif (is_bool($value)) {
                $value = ($value) ? 'TRUE' : 'FALSE';
            }
            $tableRows[] = [$key, $value];
        }
        return $tableRows;
    }