src/Tokens/Tokenizer.php
public function createToken($input)
    {
        $i = 0;
        $token = $this->readAlternativeSentenceOrSingle($input, $i);

        if (isset($input[$i])) {
            throw new \InvalidArgumentException('Invalid root token, expression has superfluous contents');
        }

        return $token;
    }
public function createToken($input)
    {
        $i = 0;
        $token = $this->readAlternativeSentenceOrSingle($input, $i);

        if (isset($input[$i])) {
            throw new \InvalidArgumentException('Invalid root token, expression has superfluous contents');
        }

        return $token;
    }
public function createToken ( $ input ) { $ i = 0 ; $ token = $ this -> readAlternativeSentenceOrSingle ( $ input , $ i ) ; if ( isset ( $ input [ $ i ] ) ) { throw new \ InvalidArgumentException ( 'Invalid root token, expression has superfluous contents' ) ; } return $ token ; }
Creates a Token from the given route expression

@param string $input
@return TokenInterface
@throws InvalidArgumentException if the route expression can not be parsed
Creates a Token from the given route expression