@param array $contentData

@return array
970188
public static function trim(array $contentData)
    {
        $data = [];

        foreach ($contentData as $item) {
            $data[] = trim($item);
        }

        return $data;
    }
1343176
private function recursivelyArrayify($content = null)
        {
            $return = [];
            if (false === $content || null === $content) {
                return;
            } else if ($content instanceof Element) {
                $return[] = $content->toArray();
            } else if (!is_array($content)) {
                $return[] = $content;
            } else {
                foreach ($content as $element) {
                    $return[] = $this->recursivelyArrayify($element);
                }
            }
            return $return;
        }
704513
protected function normalizeData($rawData)
    {
        $data = array();
        foreach ($rawData as $key => $value) {
            if (is_array($value)) {
                $item = array('text' => $key, 'children' => $this->normalizeData($rawData[$key]));
            } else {
                $item = array('id' => $key, 'text' => $value);
            }
            $data[] = $item;
        }
        return $data;
    }
716615
protected function getContentLocationIds($contentObjectId)
    {
        $query = $this->databaseHandler->createSelectQuery();
        $query->select('node_id')
            ->from($this->databaseHandler->quoteTable(self::CONTENTOBJECT_TREE_TABLE))
            ->where($query->expr->eq('contentobject_id', $contentObjectId));
        $stmt = $query->prepare();
        $stmt->execute();
        $nodeIds = $stmt->fetchAll(PDO::FETCH_COLUMN);

        return is_array($nodeIds) ? array_map('intval', $nodeIds) : [];
    }
185994
protected function createNewItem($itemData)
    {
        $item = array_flip($this->columns);

        foreach ($item as $key => $value) {
            if (isset($itemData[$key])) {
                $item[$key] = $itemData[$key];
            } else {
                $item[$key] = null;
            }
        }

        return $item;
    }
1362656
protected function mergeMethods($nodeData)/*# : array */
    {
        // no merge
        if (empty($nodeData) || isset($nodeData[0])) {
            return (array) $nodeData;
        }

        // in sections
        $result = [];
        foreach ($nodeData as $data) {
            $result = array_merge($result, $data);
        }
        return $result;
    }
729543
private function parseCertData(string $certData): array
    {
        $certContent = @openssl_x509_parse($certData);
        if (empty($certContent)) {
            throw new RequestInvalidSignatureException('Parse cert failed.');
        }

        return $certContent;
    }
930755
public function decode(string $data, string $contentType): array
    {
        if (isset($this->decoderTypes[$contentType])) {
            return $this->decoderTypes[$contentType]->decode($data);
        }

        throw DeserializerLogicException::createMissingContentType($contentType);
    }
167510
protected function getChoice($contentId)
    {
        $choices = array();
        $content = $this->contentRepository->findOneByContentId($contentId);
        $choices[$content->getContentId()] = $content->getName();

        return $choices;
    }
96709
private static function headers_to_array($headerContent) {
		$headers = array();
		$arrRequests = explode("\r\n\r\n", $headerContent);
		foreach (explode("\r\n", $arrRequests[0]) as $i => $line) {
			if ($i === 0) {
				$headers['http_code'] = $line;
			} else {
				list($key, $value) = explode(': ', $line);
				$headers[$key] = $value;
			}
		}
		return $headers;
	}
1025702
protected function getFullTextValues(Content $content)
    {
        $fullTextValues = [];
        foreach ($content->fields as $field) {
            $fieldDefinition = $this->contentTypeHandler->getFieldDefinition(
                $field->fieldDefinitionId, Content\Type::STATUS_DEFINED
            );
            if (!$fieldDefinition->isSearchable) {
                continue;
            }

            $value = $this->getFullTextFieldValue($field, $fieldDefinition);
            if (empty($value)) {
                continue;
            }

            $fullTextValues[] = new FullTextValue(
                [
                    'id' => $field->id,
                    'fieldDefinitionId' => $field->fieldDefinitionId,
                    'fieldDefinitionIdentifier' => $fieldDefinition->identifier,
                    'languageCode' => $field->languageCode,
                    'value' => !is_array($value) ? $value : implode(' ', $value),
                ]
            );
        }

        return $fullTextValues;
    }
1145174
private function normalizeLocationData(LocationData $locationData)
    {
        return [
            'id' => $locationData->getId(),
            'name' => $locationData->getName(),
            'code' => $locationData->getCode(),
            'type' => $locationData->getType(),
        ];
    }
239087
protected function filterTransUnitData($unitsData)
    {
        $cleaned = array();

        foreach ($unitsData as $unit) {
            /* @var $unit TransUnit */
            $transUnit = array(
                'id'           => $unit['Id'],
                'key'          => $unit['Key'],
                'domain'       => $unit['Domain'],
                'translations' => array(),
            );

            foreach ($unit['Translations'] as $translation) {
                $transUnit['translations'][] = array(
                    'locale'  => $translation['Locale'],
                    'content' => $translation['Content'],
                );
            }

            $cleaned[] = $transUnit;
        }

        return $cleaned;
    }
246618
public function getContentIdsByContentTypeId($contentTypeId)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query
            ->select($this->dbHandler->quoteColumn('id'))
            ->from($this->dbHandler->quoteTable('ezcontentobject'))
            ->where(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('contentclass_id'),
                    $query->bindValue($contentTypeId, null, PDO::PARAM_INT)
                )
            );

        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetchAll(PDO::FETCH_COLUMN);
    }
1107837
private function getContentSubdocuments(Content $content)
    {
        if ($this->contentSubdocumentMapper->accept($content)) {
            return $this->contentSubdocumentMapper->mapDocuments($content);
        }

        return [];
    }
1035899
protected function getConfigForContentType(ContentType $contentType)
    {
        if ($this->hasConfigForContentType($contentType)) {
            return $this->config['override_by_type'][$contentType->identifier];
        }

        return [];
    }
1115798
protected function getIndexOptions(array $indexData): string
    {
        $options = [];

        if (isset($indexData['Key_name'])) {
            $options['name'] = $indexData['Key_name'];
        }
        if (isset($indexData['Non_unique']) && $indexData['Non_unique'] == 1) {
            $options['unique'] = false;
        } else {
            $options['unique'] = true;
        }

        //Number of characters for nonbinary string types (CHAR, VARCHAR, TEXT)
        // and number of bytes for binary string types (BINARY, VARBINARY, BLOB)
        if (isset($indexData['Sub_part'])) {
            $options['limit'] = $indexData['Sub_part'];
        }
        // MyISAM only
        if (isset($indexData['Index_type']) && $indexData['Index_type'] == 'FULLTEXT') {
            $options['type'] = 'fulltext';
        }

        $result = '';
        if (!empty($options)) {
            $result = $this->prettifyArray($options, 3);
        }

        return $result;
    }