Get the required 'case type' for transforming response data

@return string
972490
public static function getResponseCaseType()
    {
        $format = static::$requestedKeyCaseFormat;

        if (! is_null($format)) {
            return $format;
        }

        // See if the client is requesting a specific case type
        $caseFormat = request()->header(static::CASE_TYPE_HEADER, null);
        if (! is_null($caseFormat)) {
            if ($caseFormat == static::CAMEL_CASE) {
                $format = static::CAMEL_CASE;
            } elseif ($caseFormat == static::SNAKE_CASE) {
                $format = static::SNAKE_CASE;
            }
        }

        // Get case format from config (default case)
        if (is_null($format)) {
            $caseFormat = Config(static::CASE_TYPE_CONFIG_PATH);

            // Figure out required case
            if ($caseFormat == static::CAMEL_CASE || empty($caseFormat)) {
                $format = static::CAMEL_CASE;
            } elseif ($caseFormat == static::SNAKE_CASE) {
                $format = static::SNAKE_CASE;
            } else {
                throw new BadRequestHttpException('Invalid case type specified in API config.');
            }
        }

        // Save and return
        static::$requestedKeyCaseFormat = $format;

        return $format;
    }
768167
private function getTimeCase()
    {
        $from = $this->from;
        $to = $this->to;

        // Single hour event
        if (!$to || $to->format('Hi') === $from->format('Hi')) {
            if ($to->format('i') == 0) {
                return 'single_round';
            }

            return 'single';
        }

        $fromTime = [
            'hour'   => $from->format('H'),
            'minute' => $from->format('i'),
        ];

        $toTime = [
            'hour'   => $to->format('H'),
            'minute' => $to->format('i'),
        ];

        $case = null;
        $case = $fromTime['hour'] !== $toTime['hour'] ? 'different_time' : $case;
        $case = $fromTime['minute'] == 0 ? 'different_time_round' : $case;
        $case = $fromTime['minute'] != $toTime['minute'] ? 'different_time' : $case;

        return $case;
    }
129132
public function getFormType()
    {
        return sprintf(
            '%s%s\\Form\Type\\%s\\FiltersType',
            $this->getVariable('namespace_prefix') ? $this->getVariable('namespace_prefix') . '\\' : '',
            $this->getVariable('bundle_name'),
            $this->getBaseGeneratorName()
        );
    }
879567
public function toTitleCase()
    {
        $str = \mb_convert_case($this->str, \MB_CASE_TITLE, $this->encoding);

        return static::create($str, $this->encoding);
    }
1156828
public function upperCaseFirst()
    {
        $first = UTF8::substr($this->scalarString, 0, 1, $this->encoding);

        $rest = UTF8::substr
        (
            $this->scalarString,
            1,
            $this->getLength() - 1,
            $this->encoding
        );

        return $this->newSelf(UTF8::strtoupper($first, $this->encoding).$rest);
    }
1216124
public function toTitleCase() {
        $returnValue = mb_convert_case((string) $this->toLower(), MB_CASE_TITLE);

        return $this->createClone($returnValue);
    }
1290864
public function getTypes() {
    $typesExport = array();
    foreach ($this->types->toArray() as $key => $type) {
      $typesExport[str_replace(':','.',$key)] = $type;
    }
    return $typesExport;
  }
569334
public function getMessageType() {
    // 
    $messageType = static::types()[$this->type];
    // If not incoming
    if ($this->type != static::INCOMING) {
      // Change to uppercase
      $messageType = strtoupper($messageType);
    }
    // Return
    return $messageType;
  }
154988
protected function _format($type) {
        $response = array(
            'success' => $this->_success,
            'data' => $this->_data
        );

        if ($this->_code) {
            $response['code'] = $this->_code;
        }

        switch (strtolower($type)) {
            case 'json':
                $format = TypeConverter::toJson($response);
            break;
            case 'xml':
                $format = TypeConverter::toXml($response);
            break;
            case 'html';
            case 'text':
            default:
                $format = (string) $this->_data;
            break;
        }

        return $format;
    }
30432
public function getReplyFormat() {
		if($this->type != 2) {
			return null;
		}

		$reply = [
			'ToUserName' => $this->to_user_name,
			'FromUserName' => $this->from_user_name,
			'CreateTime' => $this->created_at,
			'MsgType' => $this->msg_type,
		];
		switch($this->msg_type) {
			case 'text':
				$reply['Content'] = $this->content;
				break;
			case 'image':
				$reply['Image']['MediaId'] = $this->media_id;
				break;
			case 'voice':
				$reply['Voice']['MediaId'] = $this->media_id;
				break;
			case 'video':
				$reply['Video'] = [
					'MediaId' => $this->media_id,
					'Title' => $this->title,
					'Description' => $this->description,
				];
				break;
			case 'music':
				$reply['Music'] = [
					'Title' => $this->title,
					'Description' => $this->description,
					'MusicUrl' => $this->music_url,
					'HQMusicUrl' => $this->hq_music_url,
					'ThumbMediaId' => $this->thumb_media_id,
				];
				break;
			case 'news':
				$articles = $this->articleList;
				$reply['ArticleCount'] = count($articles);
				$reply['Articles'] = [];
				foreach($articles as $article) {
					$reply['Articles'][] = [
						'Title' => $article['title'],
						'Description' => $article['description'],
						'PicUrl' => $article['pic_url'],
						'Url' => $article['url'],
					];
				}
				break;
			default:
				return null;
				break;
		}

		return $reply;
	}
571632
public function getAdapterType()
  {
    if($this->adapter instanceof Adapter)
    {
      $string = Str::factory(get_class($this->adapter));

      return $string->substr($string->findLast("_"))->replace(array("_", " "), "")->toString();
    }

    return "Unknown";
  }
701542
public function getTypeQuery()
    {

        switch( true ) {

            case $this->name === 'timestamp':
            case $this->name === 'bool':

                return $this->name;

            case $this->isEnum(): // enum's behave like strings

                return $this->name;

            case $this->name === 'bpchar': // "blank-padded char", the internal name of the 'character' data type
            case $this->name === 'text':

                return 'text';

            case $this->name === 'int2':
            case $this->name === 'int4':
            case $this->name === 'int8':

                return 'int';

            default:

                return $this->name;
                throw new \UnexpectedValueException( "type::pgTypeToQueryValidateType doesnt know about type `{$type}`" );

        }

    }
21698
public function getAtomizedValueType()
	{
		if ( $this->IsNode )
		{
			switch ( $this->TypeCode )
			{
				case XmlTypeCode::Text:
				case XmlTypeCode::ProcessingInstruction:
				case XmlTypeCode::Comment:
				case XmlTypeCode::UntypedAtomic:
					return Types::$UntypedAtomicType;

				default:

					if ( ! is_null( $this->SchemaType ) )
						return $this->SchemaType->Datatype->ValueType;
					else if ( ! is_null( $this->SchemaElement ) )
					{
						if ( ! is_null( $this->SchemaElement->ElementSchemaType ) && ! is_null( $this->SchemaElement->ElementSchemaType->Datatype ) )
							return $this->SchemaElement->ElementSchemaType->Datatype->ValueType;
					}
					else if ( ! is_null( $this->SchemaAttribute ) )
					{
						if ( ! is_null( $this->SchemaAttribute->AttributeSchemaType ) && ! is_null( $this->SchemaAttribute->AttributeSchemaType->Datatype ) )
							return $this->SchemaAttribute->AttributeSchemaType->Datatype->ValueType;
					}
					return Types::$UntypedAtomicType;
			}
		}
		else
			return $this->ItemType;
	}
29510
public function toString()
	{
		if( function_exists( 'mb_convert_case' ) )
			$name	= mb_convert_case( $this->name, MB_CASE_TITLE );
		else
			$name	= str_replace( " ", "-", ucwords( str_replace( "-", " ", $this->name ) ) );
		return $name.": ".$this->value;
	}
839140
protected function getType()
  {
    if($this->currObj instanceof TeamSpeak3_Node_Server)
    {
      return "server";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Channel)
    {
      return "channel";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Client)
    {
      return "client";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Servergroup || $this->currObj instanceof TeamSpeak3_Node_Channelgroup)
    {
      return "group";
    }

    return "host";
  }
235002
public function getContentType()
    {
        switch ($this->input->getFormat()) {

            case InputInterface::FORMAT_JSON:
                return ClientInterface::CONTENT_TYPE_JSON;
                break;

            case InputInterface::FORMAT_TEXT:
                return ClientInterface::CONTENT_TYPE_TEXT;
                break;

            default:
                throw new \LogicException('Allowed invalid input format to be set.');
        }
    }
874170
public function toTypeHint(): string {
        if ($this->mixed) {
            throw new LogicException('Cannot make typehint for mixed type');
        }

        if ($this->nullable) {
            return '?'.$this->name;
        }

        return $this->name;
    }