getType() public method

public getType ( ) : string
return string
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::LIST_REFERENCE_TYPE;
 }
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::DYNAMIC_ARRAY_TYPE;
 }
Beispiel #3
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::IDENTITY_TYPE;
 }
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::FUNCTION_TYPE;
 }
Beispiel #5
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::STRING_TYPE;
 }
 public static function createForUnparsableToken(Token $token, int $code = 0, \Throwable $previous = null) : ParseException
 {
     return new ParseException(sprintf('Could not parse the token "%s" (type: %s).', $token->getValue(), $token->getType()), $code, $previous);
 }
Beispiel #7
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::VARIABLE_TYPE;
 }
Beispiel #8
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::PARAMETER_TYPE;
 }
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return TokenType::ESCAPED_VALUE_TYPE === $token->getType();
 }