@param string $code

@return array
349667
protected function getTokenFields(string $code)
    {
        $data = $this->getTokenBaseFields($code);

        if (is_array($this->tokenFieldsExtra)) {
            $array = $this->tokenFieldsExtra;
            array_walk($array, function ($v, $k) use (&$data) {
                $data = array_add($data, $k, $v);
            });
        }

        return $data;
    }
923598
protected function checksum($code)
	{
		$chars = [
			'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
			'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
			'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
			'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%'
		];

		$sum = 0;
		$clen = strlen($code);

		for ($i = 0; $i < $clen; ++$i) {
			$k = array_keys($chars, $code[$i]);
			$sum += $k[0];
		}

		$j = ($sum % 43);

		return $chars[$j];
	}
425026
public static function getDetails($code)
    {
        $infos = self::getInfoForCurrencies();
        if (array_key_exists($code, $infos)) {
            return $infos[$code];
        }
        $infos = self::getInfoForCurrenciesWithoutCurrencyCode();
        if (array_key_exists($code, $infos)) {
            return $infos[$code];
        }
        $infos = self::getInfoForCurrenciesWithUnofficialCode();
        if (array_key_exists($code, $infos)) {
            return $infos[$code];
        }
        $infos = self::getInfoForCurrenciesWithHistoricalCode();
        if (array_key_exists($code, $infos)) {
            return $infos[$code];
        }
        throw new \InvalidArgumentException('Unknown \$code: ' . $code);
    }
773885
public static function getDescription($code)
    {
        if (isset(self::$codes[$code])) {
            return sprintf('%d (%s)', $code, self::$codes[$code]);
        }
        return $code;
    }
366722
public function get_string_from_code($code) {
		$errors = [
			self::ERR_GENERAL => 'General Error',
			self::ERR_BAD_REQUEST => 'Bad Request',
			self::ERR_UNAUTHORIZED => 'Unauthorized',
			self::ERR_FORBIDDEN => 'Forbidden',
			self::ERR_INTERNAL_ERROR => 'Internal Error',
			self::ERR_PRECONDITION_FAILED => 'Precondition Failed',
			self::ERR_RESOURCE_NOT_FOUND => 'Resource Not Found',
			self::ERR_INVALID_RESOURCE => 'Invalid Resource',
			self::ERR_NOT_IMPLEMENTED => 'Feature not implemented',
			self::ERR_DISABLED => 'Feature Disabled',
			self::ERR_NETWORKING_DISABLED => 'Networking is Disabled',
		];

		return (isset($errors[$code])) ? $errors[$code] : '';
	}
49853
public static function getText($code)
    {
        $code = (int) $code;

        if (!self::exists($code)) {
            throw new \DomainException('Http Code does not exist!');
        }

        return self::$httpCodes[$code];
	}
913051
public static function getLanguage($code = 'default')
    {
        if ($code == 'default') {
            $code = App::getLocale();
        }

        return self::addNames([$code])[$code];
    }
1080823
public function repositories(string $code=''){
    $all = $this->options->full_soptions($this->options->from_code('PATHS', 'ide', 'appui'));      
    $cats = [];
    $r = [];
    foreach ( $all as $a ){
      if ( \defined($a['bbn_path']) ){
        $k = $a['bbn_path'] . '/' . ($a['code'] === '/' ? '' : $a['code']);
        if ( !isset($cats[$a['id_alias']]) ){
          unset($a['alias']['cfg']);
          $cats[$a['id_alias']] = $a['alias'];
        }
        unset($a['cfg']);
        unset($a['alias']);
        $r[$k] = $a;
        $r[$k]['title'] = $r[$k]['text'];
        $r[$k]['alias_code'] = $cats[$a['id_alias']]['code'];
        if ( !empty($cats[$a['id_alias']]['tabs']) ){
          $r[$k]['tabs'] = $cats[$a['id_alias']]['tabs'];
        }
        else if( !empty($cats[$a['id_alias']]['extensions']) ){
          $r[$k]['extensions'] = $cats[$a['id_alias']]['extensions'];
        }
        unset($r[$k]['alias']);
      }
    }
    if ( $code ){
      return isset($r[$code]) ? $r[$code] : false;
    }
    return $r;
  }
287466
public static function getDescription($code)
    {
        if (array_key_exists($code, self::$codes_to_string_map)) {
            return self::$codes_to_string_map[$code];
        } else {
            return false;
        }
    }
1188498
final public function get($code = null) {

        if ( is_null($code) ) return $this->rpc_errors;

        else if ( array_key_exists($code, $this->rpc_errors) ) return $this->rpc_errors[$code];

        else if ( $code >= -32099 && $code <= -32000 ) return 'Server Error';

        else return 'Unknown Error';

    }
204833
public function getAccessToken(string $code)
    {
        $response = $this->getHttpClient()->post($this->getTokenUrl(), [
            'auth' => [$this->clientId, $this->clientSecret],
            'headers' => ['Accept' => 'application/json'],
            'form_params' => $this->getTokenFields($code),
        ]);
        return json_decode($response->getBody(), true)['access_token'];
    }
173554
public static function getHierarchyParents($code)
    {
        $parents = [''];

        $node_length = strlen($code);
        $current_length = 0;

        foreach (static::getHierarchyLengths() as $length) {
            if ($current_length + $length === $node_length) {
                return $parents;
            } elseif ($current_length + $length > $node_length) {
                return false;
            } else {
                $current_length += $length;
                $parents[] = substr($code, 0, $current_length);
            }
        }

        return false;
    }
1078676
public function getInfo(string $id, string $code): array
    {
        return $this->httpClient->postJson('card/invoice/reimburse/getinvoiceinfo', ['card_id' => $id, 'encrypt_code' => $code]);
    }
125944
public function getAuthorizationCode($code)
    {
        if (!isset($this->authorizationCodes[$code])) {
            return false;
        }

        return array_merge(array(
            'authorization_code' => $code,
        ), $this->authorizationCodes[$code]);
    }
1098480
public function get($code): array
    {
        $options = ['json' => ['code' => $code]];

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

        return $stream->jsonSerialize()['organizationTitles'];
    }
814911
protected function prepareMultiInsert($code)
    {
        $default      = Languages::where('is_default', 1)->first()->code;
        $translations = Translation::where('locale', $default)->get()->toArray();
        $translation  = new Translation();
        $guarded      = $translation->getGuarded();
        $langId       = Languages::where('code', $code)->first()->id;
        $inserts      = array_map(function($current) use($code, $langId, $guarded) {
            $current['locale']  = $code;
            $current['lang_id'] = $langId;
            return array_except($current, $guarded);
        }, $translations);

        return $inserts;
    }
1332640
final public static function get_header_string(int $code) {
		if (!isset(self::$header_string[$code]))
			$code = 404;
		return [
			'code' => $code,
			'msg'  => self::$header_string[$code],
		];
	}