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

@return mixed
164100
public static function fromDict($rsp, $txnType, $returnType = 'HpsAltPaymentCapture')
    {
        $addToBatch = $rsp->Transaction->$txnType;

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

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

        return $capture;
    }
947881
public function findWhere($criteria, $returnType = Table::RETURN_MODEL) {
        if (!is_array($criteria)) {
            $criteria = array($criteria);
        }
        $return = $this->select($criteria, $returnType);
        if (is_a($return, 'DBScribe\Table')) $return = $return->execute();
        return $return;
    }
548532
private function buildEventAggregate(array $rows, $returnType)
    {
        if ($returnType === self::RETURN_AS_ARRAY) {
            return $this->buildEventAggregateAsArray($rows);
        }

        return $this->buildEventAggregateAsObject($rows);
    }
616246
public function call(string $method, $args = [], string $returnType = 'mixed'): \Generator
    {
        $result = yield $this->rpc->call($method, $this->mapper->dump($args));

        return $this->mapper->load($result, $returnType);
    }
1353131
protected function completeAbstractValue(
        AbstractTypeInterface $returnType,
        array $fieldNodes,
        ResolveInfo $info,
        array $path,
        &$result
    ) {
        $runtimeType = $returnType->hasResolveTypeCallback()
            ? $returnType->resolveType($result, $this->context->getContextValue(), $info)
            : \call_user_func(
                $this->typeResolverCallback,
                $result,
                $this->context->getContextValue(),
                $info,
                $returnType
            );

        if ($runtimeType instanceof PromiseInterface) {
            return $runtimeType->then(function ($resolvedRuntimeType) use (
                $returnType,
                $fieldNodes,
                $info,
                $path,
                &$result
            ) {
                return $this->completeObjectValue(
                    $this->ensureValidRuntimeType($resolvedRuntimeType, $returnType, $info, $result),
                    $fieldNodes,
                    $info,
                    $path,
                    $result
                );
            });
        }

        $returnType = $this->ensureValidRuntimeType($runtimeType, $returnType, $info, $result);

        return $this->completeObjectValue(
            $returnType,
            $fieldNodes,
            $info,
            $path,
            $result
        );
    }
979772
private function createReturnType(): string
    {
        $returnTypeHint = '';
        $typeCount = count($this->typesForFix);

        foreach ($this->typesForFix as $type) {
            // We add the default value if only null is used (which has no real native return type).
            if ($type === 'null' && ($typeCount === 1)) {
                $returnTypeHint = $this->defaultNullReturn;
                break; // We still need this break to prevent further execution of the default value.
            }

            // We add the question mark if there is a nullable type.
            if (in_array($type, self::NULL_TYPES, true) && ($typeCount > 1)) {
                $returnTypeHint = '?' . $returnTypeHint;
                continue; // We still need this continue to prevent further execution of the questionmark.
            }

            // We add a fixable "native" type. We do not fix custom classes (because it would have side effects to the
            // imported usage of classes.
            $returnTypeHint .= (TypeHintHelper::isSimpleTypeHint($type))
                ? TypeHintHelper::convertLongSimpleTypeHintToShort($type)
                : $type;
        }

        return $returnTypeHint;
    }
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];
    }
837138
public function getRawAggregate($returnType)
  {
    if ($returnType == DOC_TYPE_ARRAY) {
      $res = array();
      foreach ($this->_aggregate as $key => $value) {
        if ($value) {
          $tmp = CPS_Response::simpleXmlToArray($value);
          // multiple or one result - returned data format should be the same!
          if (isset($tmp['data'][0])) {
            // multiple results
            $res[$key] = $tmp['data'];
          } else {
            // one result
            $res[$key][] = $tmp['data'];
          }
          unset($tmp);
        } else {
          $res[$key] = array();
        }
      }
      return $res;
    } else if ($returnType == DOC_TYPE_STDCLASS) {
      $res = array();
      foreach ($this->_aggregate as $key => $value) {
        if ($value) {
          $tmp = CPS_Response::simpleXmlToStdClass($value);
          $res[$key] = $tmp->data;
          unset($tmp);
        } else {
          $res[$key] = new stdClass();
        }
      }
      return $res;
    }
    return $this->_aggregate;
  }
611126
public function setReturnType ($type = FALSE)
	{
		
		// If there is a return argument
		
		if ($type !== FALSE)
		{
			
			// Set it
			
			$this->returnType	= $type;
			
		}
		
		// Else if there is a return type in the arguments
		
		else if (isset ($this->args['return_type']))
		{
			
			// Set it
			
			$this->returnType	= $this->args['return_type'];
			
		}
		
	}
1060601
public function findOneWhere($criteria, $returnType = Table::RETURN_MODEL) {
        $this->limit(1);
        $result = $this->findWhere($criteria, $returnType);
        if (is_array($result)) {
            $result = array_values($result);
            return ($returnType === Table::RETURN_JSON) ? json_encode($result[0])
                        : $result[0];
        }
        else if (is_object($result)) {
            return $result->first();
        }
    }
219728
public function find($id, $returnType = Table::RETURN_MODEL) {
        return $this->findBy($this->getPrimaryKey(), $id, $returnType);
    }
1275386
public static function setArrayReturnType($returnType)
    {
        if (($returnType == self::RETURN_ARRAY_AS_VALUE) ||
            ($returnType == self::RETURN_ARRAY_AS_ERROR) ||
            ($returnType == self::RETURN_ARRAY_AS_ARRAY)) {
            self::$returnArrayAsType = $returnType;
            return true;
        }
        return false;
    }
456224
public static function fromDict($rsp, $txnType, $returnType = 'HpsAltPaymentSale')
    {
        $charge = $rsp->Transaction->$txnType;

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

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

        return $sale;
    }
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;
    }
882807
protected function returnResultSet(&$resultSet,$type='') {
        foreach ($resultSet as $key=>$data)
            $resultSet[$key]  =  $this->returnResult($data,$type);
        return $resultSet;
    }
1344975
public static function getWebhookPayload($returnObject = false) {
        $data = file_get_contents("php://input");
        if ($data) {
            return self::jsonDecode($data, !$returnObject);
        } else {
            return null;
        }
    }
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();
    }