Return the samples and labels in a single array.

@return array[]
766964
public function zip() : array
    {
        $rows = $this->samples;

        foreach ($rows as $i => &$row) {
            $row[] = $this->labels[$i];
        }

        return $rows;
    }
855441
protected function identifiersToArray(): array
    {
        $data = [];

        foreach ($this->getIdentifiers() as $identifier)
        {
            $data[] = $identifier->toArray();
        }

        return $data;
    }
679309
protected function getDropdownLabels()
    {
        if ($source = array_get($this->field->options(), 'label_source')) {

            $labels = $this->getDropdownLabelsFromSource($source);

            if (false !== $labels) {
                return $labels;
            }
        }

        $labels = array_get($this->field->options(), 'labels_translated', []);

        if (count($labels)) {
            return array_map('cms_trans', $labels);
        }

        return array_get($this->field->options(), 'labels', []);
    }
1044873
public function getLabels()
    {
        $result = [];

        $labels = (isset($this->indexReverse[self::LABEL])) ? $this->indexReverse[self::LABEL] : [];

        foreach ($labels as $index) {
            $result[] = $this->getChild($index);
        }

        return $result;
    }
1345106
public function toArray()
    {
        $schema = array(
            'name' => $this->_name,
            'label' => $this->_label,
            'description' => $this->_description,
            'type' => $this->_type,
            'store' => $this->_isStored,
            'index' => $this->_isIndexd,
            'multivalue' => $this->_isMultiValued,
        );

        if (isset($this->_size)) {
            $schema['size'] = $this->_size;
        }

        return $schema;
    }
1352669
public function getItemsAsArray()
    {
        $items = [];

        foreach ($this->teasers as $page => $teaser) {
            if ($page == $this->intPage) {
                $items[] = [
                    'page' => $page,
                    'href' => null,
                    'title' => null,
                    'text' => $teaser,
                ];
            } else {
                $items[] = [
                    'page' => $page,
                    'href' => $this->linkToPage($page),
                    'title' => StringUtil::specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['goToPage'], $page)),
                    'text' => $teaser,
                ];
            }
        }

        if ($this->singlePageUrl) {
            $items[] = [
                'page' => 'singlePage',
                'href' => $this->singlePageUrl,
                'title' => null,
                'text' => $GLOBALS['TL_LANG']['MSC']['readOnSinglePage'],
            ];
        }

        return $items;
    }
600054
public function toArray()
    {
        if (!is_array($this->getValue()))
            return array($this->getLabel(), $this->getValue());

        $ary = array($this->getLabel(), array());

        foreach ($this->getValue() as $hrExpr)
            $ary[1][] = $hrExpr->toArray();

        return $ary;
    }
348327
private function getSamples($name)
    {
        $data = $this->storage->getValues($name);
        $samples = [];
        foreach ($data as $row) {
            $samples[] = new Sample($name, $this->labelNames, $row[1], $row[0]);
        }

        return $samples;
    }
902570
public function toOptionArray()
    {
        $result = $row = [];
        $i = 0;
        foreach ($this->times as $one) {
            if ($i == 0) {
                $row = [
                    'value' => $one,
                    'label' => $one . __(' Hour'),
                ];
            } else {
                $row = [
                    'value' => $one,
                    'label' => $one . __(' Hours'),
                ];
            }
            $result[] = $row;
            ++$i;
        }

        return $result;
    }
1139920
public function toArray()
	{
		$list = parent::toArray();

		$list[$this->_prefix . 'code'] = $this->getCode();
		$list[$this->_prefix . 'domain'] = $this->getDomain();
		$list[$this->_prefix . 'label'] = $this->getLabel();
		$list[$this->_prefix . 'status'] = $this->getStatus();

		return $list;
	}
190314
public function getLabels()
    {
        return [
            'name' => $this->plural,
            'singular_name' => $this->singular,
            'add_new' => 'Add New'.' '.$this->singular,
            'add_new_item' => 'Add New'.' '.$this->singular,
            'edit_item' => 'Edit'.' '.$this->singular,
            'new_item' => 'New'.' '.$this->singular,
            'all_items' => 'All'.' '.$this->plural,
            'view_item' => 'View'.' '.$this->singular,
            'search_items' => 'Search'.' '.$this->plural,
            'not_found' => $this->plural.' '.'no found',
            'not_found_in_trash' => $this->plural.' '.'no found in Trash',
            'parent_item_colon' => '',
            'menu_name' => $this->plural,
        ];
    }
329937
public static function labels()
    {
        self::bootClass();

        $result = [];

        foreach (static::values() as $value) {
            $result[] = static::getLabel($value);
        }

        return $result;
    }
190831
public function getBeginEndPreferredLabelPairs()
	{
		$result = parent::getBeginEndPreferredLabelPairs();
		$result[] = array(
			self::$originallyStatedLabel,
			XBRL_Constants::$labelRoleRestatedLabel,
		);
		$result[] = array(
			// self::$originallyStatedLabel,
			XBRL_Constants::$labelRoleVerboseLabel,
		);

		return $result;
	}
27565
public static function get_post_types() {
		$items = [];

		// Get the post types.
		$post_types = get_post_types(
			[
				'public' => true,
			],
			'objects'
		);

		// Build the array.
		foreach ( $post_types as $post_type ) {
			$items[ $post_type->name ] = $post_type->labels->name;
		}

		return $items;
	}
376010
public function toArray()
    {
        $result     = parent::toArray();

        $result['locationX']    = $this->locationX;
        $result['locationY']    = $this->locationY;
        $result['scale']        = $this->scale;
        $result['label']        = $this->label;

        return $result;
    }
1236409
public function toArray() {
        return array_filter(
                array(
                    'id' => $this->id,
                    'label' => $this->label,
                    'type' => $this->type,
                ), function ($val) { return !is_null($val);}
        );
    }
1196885
protected function results()
    {
        $results = [];
        
        if (is_array($this->data)) {
            if ($this->singleMode) {
                if ($this->singleModeBottom) {
                    if (isset($this->data[0])) {
                        return [$this->singleResult($this->data[0], $this->singleMode)];
                    }
                }
            } else {
                foreach ($this->data as $data) {
                    $results[] = $this->singleResult($data, $this->singleMode);
                }
            }
        }
        
        return $results;
    }