@param mixed $id

@psalm-param class-string<TDbObj> $type

@return array<string, mixed>
485862
private static function DaftObjectIdPropertiesFromType(string $type, $id) : array
    {
        /**
        * @var array<int, string>
        */
        $idProps = array_values($type::DaftObjectIdProperties());

        if (is_scalar($id) && 1 === count($idProps)) {
            $id = [$id];
        }

        /**
        * @var array<string, mixed>
        */
        $idkv = [];

        if (is_array($id)) {
            foreach ($idProps as $i => $prop) {
                /**
                * @var scalar|array|object|null
                */
                $propVal = $id[$i] ?? null;

                $idkv[$prop] = $propVal;
            }
        }

        return $idkv;
    }
783486
public function getPins($type, $id = NULL) {
    if ($id) {
      $location_ids[] = $id;
    }
    else {
      $location_ids = $this->queryFactory->get('node')
        ->condition('type', $type)
        ->condition('status', 1)
        ->execute();
    }

    if (!$location_ids) {
      return [];
    }

    $storage = $this->entityTypeManager->getStorage('node');
    $builder = $this->entityTypeManager->getViewBuilder('node');
    $locations = $storage->loadMultiple($location_ids);

    // Get labels and icons for every bundle from OpenY Map config.
    $typeIcons = $this->configFactory->get('openy_map.settings')->get('type_icons');
    $typeLabels = $this->configFactory->get('openy_map.settings')->get('type_labels');
    $tag = $typeLabels[$type];
    $pins = [];
    foreach ($locations as $location) {
      $view = $builder->view($location, 'teaser');
      $coordinates = $location->get('field_location_coordinates')->getValue();
      if (!$coordinates) {
        continue;
      }
      $uri = !empty($typeIcons[$location->bundle()]) ? $typeIcons[$location->bundle()] :
        '/' . drupal_get_path('module', 'openy_map') . "/img/map_icon_green.png";
      $pins[] = [
        'icon' => $uri,
        'tags' => [$tag],
        'lat' => round($coordinates[0]['lat'], 5),
        'lng' => round($coordinates[0]['lng'], 5),
        'name' => $location->label(),
        'markup' => $this->renderer->renderRoot($view),
      ];
    }

    return $pins;
  }
463436
public function buildTabs( $id, $class = NULL )
	{
		if( empty( $class ) && !empty( $this->options['navClass'] ) )
			$class	= $this->options['navClass'];
		return self::createTabs( $id, $this->tabs, $this->divs, $class );
	}
454291
public function resolve($type, $id)
    {
        $instance = (new $type)->find($id);

        if ($instance) {
            return $instance;
        }

        throw new EntityNotFoundException($type, $id);
    }
203149
protected function getMorphs($name, $type, $id)
    {
        $type = $type ?: $name.'_type';

        $id = $this->getkeyname();

        return array($type, $id);
    }
469659
protected function getTypeById($type, $id)
    {
        $items = isset($this->$type) ? $this->$type : [];

        if (false === isset($items[$id])) {
            throw new \RuntimeException(sprintf("Unknown %s item with id '%s'", $type, $id), 404);
        }

        return $items[$id];
    }
952305
public function getClassNameById($id)
    {
        return (isset($this->classNameById[$id])) ? $this->classNameById[$id] : null;
    }
122666
protected function getNodes($class, $id)
    {
        $records = [];
        $records['nodes'] = [];
        $models = $this->getNodeModels($class, $id);
        foreach ($models as $model) {
            $records['nodes'][] = $this->getNodeValues($model);
        }
        return $records;
    }
818053
public static function get($id){
		$class_name = get_called_class();
		if( !isset(self::$instances[$class_name]) ){
			self::$instances[$class_name] = [];
		}
		if( !isset(self::$instances[$class_name][$id]) ){
			self::$instances[$class_name][$id] = new $class_name($id);
		}
		return self::$instances[$class_name][$id];
	}
835349
public function getContextObjectWithIDAndClass($id, $className) {
		$result = null;
		if ($id && $className) {
			$prevMode = Versioned::get_reading_mode();
			Versioned::set_reading_mode("Stage.Stage");

			$result = DataObject::get_by_id($className, $id);

			Versioned::set_reading_mode($prevMode);
		}
		return $result;
	}
593089
public function getByToken(int $id, string $token, int $type = self::TOKEN_TYPE_REMEMBER) : ?Authenticatable
    {
        return $type === self::TOKEN_TYPE_REMEMBER ?  $this->getByRememberToken($id, $token) : $this->getByApiToken($id, $token);
    }
101687
public function getPClass($id)
    {
        if (!is_numeric($id)) {
            throw new Klarna_InvalidTypeException('id', 'integer');
        }

        $this->_checkConfig();

        if (!$this->pclasses || !($this->pclasses instanceof PCStorage)) {
            $this->pclasses = $this->getPCStorage();
            $this->pclasses->load($this->pcURI);
        }
        return $this->pclasses->getPClass(
            intval($id), $this->_eid, $this->_country
        );
    }
161425
public function getTaxonomiesWithArcRoleTypeId( $id )
	{
		return array_filter( $this->importedSchemas, function( /** @var XBRL $taxonomy */ $taxonomy ) use( $id )
		{
			return $taxonomy->hasArcRoleTypeId( $id ); }
		);
	}
1139330
public function getById($id)
    {
        if (!isset($this->pluginInstances[$id])) {
            $class = $this->getPluginClass($id);
            if (!class_exists($class)) {
                $this->pluginInstances[$id] = false;
            } else {
                $this->pluginInstances[$id] = new $class(['wei' => $this->wei]);
            }
        }

        return $this->pluginInstances[$id];
    }
108092
public function actionIndex($id, $type = 'notes')
    {
        $model = $this->findModel($id);
        if (!isset($this->collectionClassMaps[$type])) {
            throw new NotFoundHttpException(Yii::t('yii', 'The requested page does not exist.'));
        }
        $query = $model->getCollections()->andWhere(['model' => $this->collectionClassMaps[$type]])->orderBy(['created_at' => SORT_DESC]);
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        return $this->render('index', [
            'model' => $model,
            'type' => $type,
            'dataProvider' => $dataProvider
        ]);
    }
1056537
public function getTypeById( $id, $prefix = null )
	{
		if ( ! isset( $this->typeIds[ $id ] ) ) return false;
		return isset( $this->typeIds[ $id ]['istype'] ) && $this->typeIds[ $id ]['istype']
			? $this->getType( $this->typeIds[ $id ]['name'], $prefix )
			: $this->getElement( $this->typeIds[ $id ]['name'], $prefix );
	}
1127565
public function getIdQuartiersFrom($id, $type = '')
    {
        $arrayIdQuartier=array();
        switch ($type) {
            case 'ville':
                $reqQuartiers = "   SELECT distinct q.idQuartier as idQuartier
						FROM quartier q
						RIGHT JOIN sousQuartier sq ON sq.idQuartier = q.idQuartier
						RIGHT JOIN rue r ON r.idSousQuartier = sq.idSousQuartier
						RIGHT JOIN historiqueAdresse ha ON ha.idRue = r.idRue
						WHERE q.idVille = '".$id."'
								";
                $resQuartiers = $this->connexionBdd->requete($reqQuartiers);
                while ($fetchQuartiers = mysql_fetch_assoc($resQuartiers)) {
                    $arrayIdQuartier[] = $fetchQuartiers['idQuartier'];
                }
                break;
            case 'idAdresse':
                break;
        }
        return $arrayIdQuartier;
    }