original_string: private static function getParamsToSign(
          array $params,
          array $ignoreParamKeys = [],
          int $currentLevel = 1,
          string $prefix = ''
      ): array
      {
          $paramsToSign = [];
          foreach ($params as $key => $value) {
              if ((in_array($key, $ignoreParamKeys) && $currentLevel == 1)) {
                  continue;
              }
              $paramKey = ($prefix ? $prefix . ':' : '') . $key;
              if (is_array($value)) {
                  if ($currentLevel >= self::MAXIMUM_RECURSION_DEPTH) {
                      $paramsToSign[$paramKey] = (string)$paramKey.':';
                  } else {
                      $subArray = self::getParamsToSign($value, $ignoreParamKeys, $currentLevel + 1, $paramKey);
                      $paramsToSign = array_merge($paramsToSign, $subArray);
                  }
              } else {
                  if (is_bool($value)) {
                      $value = $value ? '1' : '0';
                  } else {
                      $value = (string)$value;
                  }
                  $paramsToSign[$paramKey] = (string)$paramKey.':'.$value;
              }
          }
          if ($currentLevel == 1) {
              ksort($paramsToSign, SORT_NATURAL);
          }
          return $paramsToSign;
      }
code: private static function getParamsToSign(
          array $params,
          array $ignoreParamKeys = [],
          int $currentLevel = 1,
          string $prefix = ''
      ): array
      {
          $paramsToSign = [];
          foreach ($params as $key => $value) {
              if ((in_array($key, $ignoreParamKeys) && $currentLevel == 1)) {
                  continue;
              }
              $paramKey = ($prefix ? $prefix . ':' : '') . $key;
              if (is_array($value)) {
                  if ($currentLevel >= self::MAXIMUM_RECURSION_DEPTH) {
                      $paramsToSign[$paramKey] = (string)$paramKey.':';
                  } else {
                      $subArray = self::getParamsToSign($value, $ignoreParamKeys, $currentLevel + 1, $paramKey);
                      $paramsToSign = array_merge($paramsToSign, $subArray);
                  }
              } else {
                  if (is_bool($value)) {
                      $value = $value ? '1' : '0';
                  } else {
                      $value = (string)$value;
                  }
                  $paramsToSign[$paramKey] = (string)$paramKey.':'.$value;
              }
          }
          if ($currentLevel == 1) {
              ksort($paramsToSign, SORT_NATURAL);
          }
          return $paramsToSign;
      }
code_tokens: private static function getParamsToSign ( array $ params , array $ ignoreParamKeys = [ ] , int $ currentLevel = 1 , string $ prefix = '' ) : array { $ paramsToSign = [ ] ; foreach ( $ params as $ key => $ value ) { if ( ( in_array ( $ key , $ ignoreParamKeys ) && $ currentLevel == 1 ) ) { continue ; } $ paramKey = ( $ prefix ? $ prefix . ':' : '' ) . $ key ; if ( is_array ( $ value ) ) { if ( $ currentLevel >= self :: MAXIMUM_RECURSION_DEPTH ) { $ paramsToSign [ $ paramKey ] = ( string ) $ paramKey . ':' ; } else { $ subArray = self :: getParamsToSign ( $ value , $ ignoreParamKeys , $ currentLevel + 1 , $ paramKey ) ; $ paramsToSign = array_merge ( $ paramsToSign , $ subArray ) ; } } else { if ( is_bool ( $ value ) ) { $ value = $ value ? '1' : '0' ; } else { $ value = ( string ) $ value ; } $ paramsToSign [ $ paramKey ] = ( string ) $ paramKey . ':' . $ value ; } } if ( $ currentLevel == 1 ) { ksort ( $ paramsToSign , SORT_NATURAL ) ; } return $ paramsToSign ; }
docstring: Get parameters to sign
  @param array $params
  @param array $ignoreParamKeys
  @param int $currentLevel
  @param string $prefix
  @return array
docstring_tokens: Get parameters to sign