@param        $rsp
@param        $txnType
@param string $returnType

@return mixed
775593
public static function fromDict($rsp, $txnType, $returnType = 'HpsGiftCardSale')
    {
        $item = $rsp->Transaction;

        $sale = parent::fromDict($rsp, $txnType, $returnType);
        $sale->splitTenderCardAmount = (isset($item->SplitTenderCardAmt) ? (string)$item->SplitTenderCardAmt : null);
        $sale->splitTenderBalanceDue = (isset($item->SplitTenderBalanceDueAmt) ? (string)$item->SplitTenderBalanceDueAmt : null);

        return $sale;
    }
455492
public function newQuery($returnType=Builder::RETURN_TYPE_ELOQUENT)
    {
        $builder = $this->newQueryWithoutScopes($returnType);

        // laravel 5.1
        if (method_exists($this, 'applyGlobalScopes')) {
            return $this->applyGlobalScopes($builder);
        }

        // laravel 5.2
        foreach ($this->getGlobalScopes() as $identifier => $scope) {
            $builder->withGlobalScope($identifier, $scope);
        }

        return $builder;
    }
408969
private function _processProcessorResponse($response, $expectedType)
    {
        $transactionId = (isset($response->Header->GatewayTxnId) ? $response->Header->GatewayTxnId : null);
        $item = $response->Transaction->$expectedType;

        if ($item != null) {
            $responseCode = (isset($item->RspCode) ? $item->RspCode : null);
            $responseMessage = (isset($item->RspMessage) ? $item->RspMessage : null);

            if ($responseCode == null && isset($item->TransactionStatus->RspCode)) {
                $responseCode = $item->TransactionStatus->RspCode;
            }
            if ($responseMessage == null && isset($item->TransactionStatus->RspText)) {
                $responseMessage = $item->TransactionStatus->RspText;
            }

            HpsProcessorResponseValidation::checkResponse($transactionId, $responseCode, $responseMessage, $item);
        }
    }
370489
public function returnData($data,$returnType = null,$option = null)
	{
		if(null === $returnType)
		{
			$returnType = Config::get('@.CONTROL_RETURN_TYPE');
		}
		$returnType = strtolower($returnType);
		if('json' === $returnType)
		{
			Response::setMime('json');
			exit(json_encode($data,null === $option?0:$option));
		}
		else if('xml' === $returnType)
		{
			Response::setMime('xml');
			exit(XML::toString($data));
		}
		else if('html' === $returnType)
		{
			Response::setMime('html');
			echo $data;
		}
		else
		{
			$eventData = array('data'=>$data,'returnType'=>$returnType,'option'=>$option);
			Event::trigger('YURUN_RETURN_DATA',$eventData);
		}
	}
1242398
private function extractReturnType(): void
  {
    // Return immediately if designation type is not appropriate for this method.
    if (!in_array($this->designationType, ['function', 'singleton0', 'singleton1'])) return;

    $key = array_search('begin', $this->routineSourceCodeLines);

    if ($key!==false)
    {
      for ($i = 1; $i<$key; $i++)
      {
        $n = preg_match('/^\s*--\s+return:\s*((\w|\|)+)\s*$/',
                        $this->routineSourceCodeLines[$key - $i],
                        $matches);
        if ($n==1)
        {
          $this->returnType = $matches[1];

          break;
        }
      }
    }

    if ($this->returnType===null)
    {
      $this->returnType = 'mixed';

      $this->io->logNote('Unable to find the return type of stored routine');
    }
  }
1325460
private function loadFixableTypes(?array $returnTypes): array
    {
        return array_filter($returnTypes ?? [], function (string $returnType): bool {
            return $this->isFixableReturnType($returnType);
        });
    }
711072
protected function addDocBlock(File $phpcsFile, int $index, string $returnType): void
    {
        $tokens = $phpcsFile->getTokens();

        $firstTokenOfLine = $this->getFirstTokenOfLine($tokens, $index);

        $indentation = $this->getIndentationWhitespace($phpcsFile, $index);

        $phpcsFile->fixer->beginChangeset();
        $phpcsFile->fixer->addNewlineBefore($firstTokenOfLine);
        $phpcsFile->fixer->addContentBefore($firstTokenOfLine, $indentation . ' */');
        $phpcsFile->fixer->addNewlineBefore($firstTokenOfLine);
        $phpcsFile->fixer->addContentBefore($firstTokenOfLine, $indentation . ' * @return ' . $returnType);
        $phpcsFile->fixer->addNewlineBefore($firstTokenOfLine);
        $phpcsFile->fixer->addContentBefore($firstTokenOfLine, $indentation . '/**');
        $phpcsFile->fixer->endChangeset();
    }
97924
protected function validateReturnTypeNotEmpty(
        File $file,
        $functionStart,
        $returnType,
        array $suggestedReturnTypes
    ) {
        $filteredReturnTypes = array_filter($suggestedReturnTypes);
        if (empty($returnType)
            && count($suggestedReturnTypes) == 1
            && count($filteredReturnTypes) == 1
        ) {
            $file->addWarning(
                sprintf(
                    'Method should have a return type in PHP7, use %s',
                    reset($filteredReturnTypes)
                ),
                $functionStart,
                'MissingReturnType'
            );
        }
    }
219728
public function find($id, $returnType = Table::RETURN_MODEL) {
        return $this->findBy($this->getPrimaryKey(), $id, $returnType);
    }
469526
protected function assertChainableReturnType(File $phpCsFile, int $stackPointer, array $parts, array $returnTypes): void
    {
        if ($returnTypes && $parts === ['$this'] && $returnTypes !== ['$this']) {
            $phpCsFile->addError('Chainable method (@return $this) cannot have multiple return types in code.', $stackPointer, 'InvalidChainable');
        }
    }
1143713
protected function parse($locale, $returnType = null)
    {
        if (extension_loaded('intl')) {
            $info = \Locale::parseLocale($locale);
        } else {
            $info = array();

            if (!preg_match('~^(?<language>[a-z]{2,4})([_-](?<region>[a-z]{2,4}))?$~i', $locale, $info)) {
                return null;
            }

            if (isset($info['region'])) {
                $info['region'] = strtoupper($info['region']);
            }
        }

        if ($returnType !== null) {
            $value = ($info && isset($info[$returnType]))? $info[$returnType] : null;
            return $value;
        }

        return $info;
    }
202239
public function fetchAll($returnType = Table::RETURN_MODEL) {
        $return = $this->select(array(), $returnType);
        if (is_a($return, 'DBScribe\Table')) $return = $return->execute();
        if (is_bool($return)) return new ArrayCollection();

        return $return;
    }
400931
public function invoke($queueName, $payload, $resultType, $timeout = 10)
    {
        $rs = $this->invokeAll(array(array($queueName, $payload, $resultType)), $timeout);
        if ($rs[0] instanceof RpcError) {
            throw new RpcErrorException($rs[0]);
        }

        return $rs[0];
    }
1238661
public function getRawDocuments($returnType)
  {
    if ($returnType == DOC_TYPE_ARRAY) {
      $res = array();
      foreach ($this->_documents as $key => $value) {
        $res[$key] = CPS_Response::simpleXmlToArray($value);
      }
      return $res;
    } else if ($returnType == DOC_TYPE_STDCLASS) {
      $res = array();
      foreach ($this->_documents as $key => $value) {
        $res[$key] = CPS_Response::simpleXmlToStdClass($value);
      }
      return $res;
    }
    return $this->_documents;
  }
470639
public static function fromDict($rsp, $txnType, $returnType = 'HpsAltPaymentAuth')
    {
        $authorize = $rsp->Transaction->$txnType;

        $auth = parent::fromDict($rsp, $txnType, $returnType);

        $auth->status = isset($authorize->Status) ? (string)$authorize->Status : null;
        $auth->statusMessage = isset($authorize->StatusMessage) ? (string)$authorize->StatusMessage : null;

        return $auth;
    }
1245414
public function SetReturnType(\Peg\Lib\Definitions\Element\ReturnType $return_type)
    {
        $return_type->overload =& $this;
        
        $this->return_type = $return_type;
        
        return $this;
    }
1166917
public static function fromDict($rsp, $txnType = null, $returnType = 'HpsManageTokensResponse')
    {
        $transaction = parent::fromDict($rsp, $txnType, $returnType);
        $transaction->responseCode = '00';
        $transaction->responseText = '';
        return $transaction;
    }