Launched when a ( sign is encountered.

@param TokenInfo $token
the current token
425969
private function _processParenthesisOpen($token) {
		if ($this->_inFuncCall) {
			// inside a function call
			$this->_fcLeftParenthesis += 1;
		} elseif ($this->_inControlStatement || $this->_inFunctionStatement) {
			// inside a function or control statement
			$this->_csLeftParenthesis += 1;
		}

		// We are in a array declaration
		if ($this->_beforeArrayDeclaration) {
			$stackitem = new StatementItem();
			$stackitem->line = $token->line;
			$stackitem->type = 'ARRAY';
			$stackitem->name = 'ARRAY';
			$this->statementStack->push($stackitem);

			$this->_beforeArrayDeclaration = false;
		}

		$this->statementStack->getCurrentStackItem()->openParentheses += 1;
	}
833601
public function setAccessToken($token)
    {
        if (!\is_array($token)) {
            throw new AuthException('Token is not a valid json string.');
        }

        if (isset($token['data']['access_token'])) {
            $token = $token['data'];
        }

        if (!isset($token['access_token'])) {
            throw new AuthException('Access token could not be retrieved from the decoded json response.');
        }

        $this->token = $token;

        $this->sign();
    }
1368090
public function setOAuth2Token ($token)
    {
        if (!StringUtilities::isNullOrEmpty($token))
        {
            $this->oAuth2Token = $token;
            $this->headers[]   = "Authorization: OAuth " . $this->oAuth2Token;
        }
    }
574753
public function registerDevice(Token $token)
    {
        $this->sendInstallationPostRequest(
            '/v1/device-server',
            [
                'headers' => [
                    'X-Bunq-Client-Authentication' => $token->toString(),
                ],
                'json'    => [
                    'description'   => 'Bunq PHP API Client',
                    'secret'        => $this->apiKey,
                    'permitted_ips' => $this->permittedIps,
                ],
            ]
        );
    }
562642
public function setAccessToken($token)
    {
        if (!$this->oauthResponse instanceof InstagramOAuth) {
            $this->oauthResponse = new InstagramOAuth(json_decode(json_encode(['access_token' => $token])));
        }
    }
536522
protected function handleFor(array $token)
    {

        $node = $this->createNode('for', $token);
        $node->subject = $token['subject'];
        $this->current = $node;
    }
796879
public function invalidateBearerToken(BearerToken $token)
    {
        $request = $this->createRequest('/oauth2/invalidate_token');
        $request->setPostParameter('access_token', $token->getValue());
        $this->signRequest($request, new BasicToken());

        $response = $this->sendRequest($request);

        if ($token->getValue() !== $response->getData('access_token')) {
            throw new OAuthException('An error occured when invalidating the bearer token.', $response);
        }
    }
1322037
protected static function pushToken(&$context, $token) {
        if ($token === '') {
            return;
        }
        if (is_string($token)) {
            if (is_string(end($context['parsed'][0]))) {
                $context['parsed'][0][key($context['parsed'][0])] .= $token;
                return;
            }
        }
        $context['parsed'][0][] = $token;
    }
352267
private function _checkNoWhiteSpaceAfter($token) {
		if ($this->_isActive('noSpaceAfterToken')) {

			$text = $token->text;

			if (!$this->_config->isException('noSpaceAfterToken', $text)) {

				// The next token is a whitespace
				if ($this->tokenizer->checkNextToken(T_WHITESPACE)) {

					// And the next valid token is on the same line
					$tokenAfter = $this->tokenizer->peekNextValidToken();
					if ($tokenAfter->line === $token->line) {
						$msg = $this->_getMessage('NO_SPACE_AFTER_TOKEN', $text);
						$this->_writeError('noSpaceAfterToken', $msg);
					}
				}
			}
		}
	}
619674
public function setToken($token)
    {
        $token = trim($token);

        $this->isChanged('token', $token);

        $this->token = $token;

        return $this;
    }
1154350
public function activate($token = null)
    {
        $activated = false;
        if ($token === null) {
            $this->redirect('/');
        }

        $this->loadModel('User.Users');
        $user = $this->Users
            ->find()
            ->select(['id', 'name', 'token'])
            ->where(['status' => 0, 'token' => $token])
            ->limit(1)
            ->first();

        if ($user) {
            if ($this->Users->updateAll(['status' => 1], ['id' => $user->id])) {
                NotificationManager::activated($user)->send();
                $activated = true;
                $this->Flash->success(__d('user', 'Account successfully activated.'), ['key' => 'activate']);
            } else {
                $this->Flash->danger(__d('user', 'Account could not be activated, please try again later.'), ['key' => 'activate']);
            }
        } else {
            $this->Flash->warning(__d('user', 'Account not found or is already active.'), ['key' => 'activate']);
        }

        $this->title(__d('user', 'Account Activation'));
        $this->set(compact('activated', 'token'));
    }
906483
protected function checkToken($token)
    {
        if (!$token) {
            return false;
        }

        $file = $this->pathForToken($token);
        $content = null;

        if (file_exists($file)) {
            $content = file_get_contents($file);
            unlink($file);
        }

        return $content === $token;
    }
391478
public function isTokenUnique($token) {

        $record = List_Unsubscribe_Token::where('token', $token)->first();

        if (!$record) {
            return true;
        }

        return false;
    }
510322
private function _processSquareBracketOpen($token) {

		// If the [ is preceded by = we are in a array declaration
		if ($this->tokenizer->checkPreviousValidToken(T_EQUAL)) {

			$stackitem = new StatementItem();
			$stackitem->line = $token->line;
			$stackitem->type = 'ARRAY';
			$stackitem->name = 'square_bracket_open';

			$this->statementStack->push($stackitem);
		}
	}
233151
public function setAccessToken($token)
    {
        if (is_string($token)) {
            $token = new Token($token);
        }
        Requestor::setToken($token);
    }
187212
public function invalidateToken(Token $token)
    {
        $this->tokenCache->remove($token->getHash());

        $this->logger->log(sprintf('Deleted token %s.', $token->getIdentifier()), LOG_INFO);
    }
255349
public function addToken($token)
    {
        if (!in_array($token, $this->tokens)) {
            $this->tokens[] = $token;
        }

        return $this;
    }