@param int $id

@return array
540584
private function getHierarchy(int $id): array
    {
        $arr  = [];
        $fqpn = [];

        while ($id !== 0) {
            $row = DB::table('placelocation')
                ->where('pl_id', '=', $id)
                ->first();

            $fqpn[]    = $row->pl_place;
            $row->fqpn = implode(Gedcom::PLACE_SEPARATOR, $fqpn);
            $id        = (int) $row->pl_parent_id;
            $arr[]     = $row;
        }

        return array_reverse($arr);
    }
1152065
private function mapLocationData(int $id): array
    {
        $row = DB::table('placelocation')
            ->where('pl_id', '=', $id)
            ->first();

        if (empty($row)) {
            $json = [
                'zoom'        => 2,
                'coordinates' => [
                    0.0,
                    0.0,
                ],
            ];
        } else {
            $json = [
                'zoom'        => (int) $row->pl_zoom ?: 2,
                'coordinates' => [
                    (float) strtr($row->pl_lati ?? '0', ['N' => '', 'S' => '-', ',' => '.']),
                    (float) strtr($row->pl_long ?? '0', ['E' => '', 'W' => '-', ',' => '.']),
                ],
            ];
        }

        return $json;
    }
1022361
public function find(int $id)
    {
        $response = $this->model->with($this->with)->find($id);
        $this->with = [];
        return $response;
    }
24740
public function getChilds($id)
    {
        $result = [];
        if (array_key_exists($id, $this->finder)) {
            return $this->recursiveGetChilds($this->finder[$id][$this->config['childs']], $result);
        } else {
            return $result;
        }
    }
1312463
protected function getAnchorsInPage($id)
    {
        $page = SiteTree::get()->byID($id);

        if (!$page || !$page->canView()) {
            return [];
        }

        return $page->getAnchorsOnPage();
    }
1086093
public function exportById($id): array
    {
        $user = Craft::$app->users->getUserById($id);
        return $this->export($user);
    }
1038924
public function removeDeployKey(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/keys/:id',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_DELETE);
    }
1350560
public function MangaPictures(int $id): array
    {
        return $this->myanimelist->getMangaPictures(
            new Request\Manga\MangaPicturesRequest($id)
        );
    }
118346
public function get_links(string $id): ?array
  {
    return $this->_get_links($id, $this->id_user, $this->id_group);
  }
105105
public function where($id)
    {
        $this->validateIdentifier($id);

        if (!is_array($id)) {
            $key = reset($this->keys);
            return [$key => $id];
        } else {
            return $id;
        }
    }
442369
public function getModifiedData($id)
    {
        $result = [];
        if (isset($this->modified[$id])) {
            foreach (array_keys($this->modified[$id]) as $column) {
                $result[$column] = $this->data[$id][$column];
            }
        }
        return $result;
    }
1173924
public function getById(int $id)
	{
		return $this->setAuthorizer($this->getModel()->where('id', '=', $id)->first());
	}
1146003
public function exportById($id): array
    {
        $tagGroup = Craft::$app->tags->getTagGroupById((int) $id);

        return $this->export($tagGroup);
    }
756406
public function delete($id)
    {
        $deleted  = false;
        $instance = $id instanceof Model ? $id : $this->find($id);

        if ($instance) {
            event(implode('-', $this->tag).'.entity.deleting', [$this, $instance]);

            $deleted = $instance->delete();

            event(implode('-', $this->tag).'.entity.deleted', [$this, $instance]);
        }

        return [
            $deleted,
            $instance,
        ];
    }
1034074
public function get(int $id)
    {
        $documents = $this->getClient()->call(null, $id, self::ENDPOINT, Document::class, true, 'GET');

        if (1 == count($documents)) {
            return current($documents);
        }

        return $documents;
    }
92202
public function result($id): array
    {
        $options = ['query' => ['id' => $id]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->get(UserApi::generateUrl('csv/result.json'), $options)
            ->getBody();

        return $stream->jsonSerialize();
    }
1247177
public function actionRemove(string $id): array
    {
        $items = Yii::$app->getRequest()->post('items', []);
        $model = $this->findModel($id);
        $model->removeChildren($items);

        return array_merge($model->getItems());
    }