Sets the Returns token

@param string $return
2636
public function returns($returns)
    {
        //check if the Return clause is even supported
        $returnTypes = $this->getValidReturnTypes();
        if (count($returnTypes) <= 0) {
            throw new LogicException("Return clause not supported for this statement");
        }

        $returns = strtoupper($returns);
        if (!in_array($returns, $returnTypes)) {
            throw new LogicException(sprintf("Unknown return type %s", $returns));
        }
        $this->setToken('Returns', $returns);
    }
950706
protected function complete($return, MvcEvent $event)
    {
        if (!is_object($return)) {
            if (ArrayUtils::hasStringKeys($return)) {
                $return = new ArrayObject($return, ArrayObject::ARRAY_AS_PROPS);
            }
        }
        $event->setResult($return);

        return $return;
    }
729278
public function setReturnCodes(array $value)
    {
        foreach ($value as $returnCode) {
            $this->assertValidReturnCode($returnCode, false);
        }

        $this->returnCodes = $value;
    }
1202003
public function setToken($token)
    {
        $this->token = $token;
        $this->username = '';
        $this->password = '';
        $this->accessToken = '';
        return $this;
    }
1203435
protected function processToken(): void
    {
        $this->getFile()->recordMetric($this->stackPos, 'Has return type', 'no');

        $returnAnnotation = $this->loadReturnAnnotation();

        if (!$this->isFilledReturnAnnotation($returnAnnotation) ||
            ($returnTypes = $this->getUsableReturnTypes($returnAnnotation))) {
            $this->validateReturnType($returnTypes ?? null);
        }
    }
894393
public function setReturnUrl($value)
    {
        $value = substr($value, 0, 200);
        $this->setParameter('returnUrl', $value);
        $this->setParameter('declineUrl', $value);
        $this->setParameter('exceptionUrl', $value);

        return $this;
    }
1141393
private function parseExpression($return = false)
    {
        //push sentinel
        $this->operatorStack->push(null);

        $token = $this->parseToken();

        while ($token->test(Token::OPERATOR, [$this->binaryOperators, 'isOperator'])) {
            $this->pushOperator(
                $this->binaryOperators->getOperator($token->getValue())
            );
            $token = $this->parseToken();
        }
        while ($this->operatorStack->top() !== null) {
            $this->popOperator();
        }
        //pop sentinel
        $this->operatorStack->pop();

        //A conditional is marked by '?' (punctuation, not operator) so it breaks the loop above.
        if ($token->test(Token::PUNCTUATION, '?')) {
            $this->parseConditional();
        }

        if ($return) {
            return $this->operandStack->pop();
        }

        return null;
    }
85063
function setResult( $result )
    {
        $this->Parameters['result'] = $result;
        $http = eZHTTPTool::instance();
        $http->setSessionVariable( 'ContentUploadParameters', $this->Parameters );
    }
1257439
public function setTokens(array $tokens = [])
    {
        $session = \PHPSession::singleton();
        $session->setAttribute(self::TOKEN_KEY, $tokens);
    }
638918
public function setReturnUrls(array $returnUrls)
    {
        foreach ($returnUrls as $key => $returnUrl) {
            $this->returnUrls[$key] = $this->parseUrl($returnUrl);
        }
    }
1233788
public function setReturnUrlTarget($value)
    {
        switch ($value) {
            case '_top':
                $value = 1;
                break;

            case '_parent':
                $value = 2;
                break;

            case '_self':
                $value = 3;
                break;

            case '_blank':
                $value = 4;
                break;

            default:
                $value = (int)$value;
        }

        return $this->setParameter('returnUrlTarget', $value);
    }
728677
final protected function display (bool $return=FALSE)
	{
		if (file_exists($this->file)):
			$output = file_get_contents($this->file);
			foreach ($this->assignedVariables as $key => $value) 
				$output = preg_replace('/{'.$key.'}/', $value, $output);
		else:
			$output = "*** Missing template error: {$this->file} ***";
		endif;

		if ($return)
			return $output;
		else
			echo $output;
	}
318548
public function justReturn($return = null)
    {
        $fqn = ltrim($this->function_name->fullyQualifiedName(), '\\');

        \Patchwork\redefine($fqn, function () use ($return) {
            return $return;
        });

        $this->assertRedefined($fqn);
    }
1239577
public function set($key, $value)
    {
        parent::set($key, $value);

        if ($key == "ACCESS_TOKEN") { 
            $user = $this->getUserId($value);
            parent::set('USER_ID', $user['id']);
        }
        
        if (parent::get('CLIENT_ID') != "" && parent::get('CLIENT_SECRET') != "" && empty(parent::get('ACCESS_TOKEN'))) {
            
            $response = $this->getToken();

            if (isset($response['access_token'])) {
                parent::set('ACCESS_TOKEN', $response['access_token']);
            

                $user = $this->getUserId($response['access_token']);

                if (isset($user['id'])) {
                    parent::set('USER_ID', $user['id']);
                }

            }
            
        }
    }
797554
private function _processReturn() {
		// If not an empty return (no value before the semicolon)
		if (!$this->tokenizer->checkNextValidToken(T_SEMICOLON)) {
			// Remember that the current function does return something (for PHPDoc)
			$this->_functionReturns = true;
		}

		// Search for unused code after the return
		$this->_checkUnusedCode('RETURN');
	}
776475
public function set($key, $token)
    {
        $this->instance->set($key, $token, $this->keyTtl);
    }
613378
public function set_return_listener($callback)
    {
        if (!is_callable($callback)) {
            throw new \InvalidArgumentException(sprintf(
                'Given callback "%s" should be callable. %s type was given.',
                $callback,
                gettype($callback)
            ));
        }

        $this->basic_return_callback = $callback;
    }