PhpSpec\CodeAnalysis\TokenizedTypeHintRewriter::rewrite PHP Method

rewrite() public method

public rewrite ( string $classDefinition ) : string
$classDefinition string
return string
    public function rewrite($classDefinition)
    {
        $this->namespaceResolver->analyse($classDefinition);
        $this->reset();
        $tokens = $this->stripTypeHints(token_get_all($classDefinition));
        $tokensToString = $this->tokensToString($tokens);
        return $tokensToString;
    }