try {
StringReader stringReader = new StringReader(new String());
ASTParser previewParser = ASTParser.newParser(stringReader, ProjectOptions.getPhpVersion(fSourceModule), false);
Program previewProgram = previewParser.createAST(null);
previewProgram.recordModifications();
AST previewAST = previewProgram.getAST();
FunctionDeclaration function = previewAST.newFunctionDeclaration(previewAST.newIdentifier(fMethodName), computeArguments(previewAST), previewAST.newBlock(), false);
MethodDeclaration method = previewAST.newMethodDeclaration(fModifierAccessFlag, function);
previewProgram.statements().add(method);
Document myDoc = new Document();
previewProgram.rewrite(myDoc, null).apply(myDoc);
return myDoc.get().substring(0, myDoc.get().indexOf(METHOD_ARGUMENT_CLOSING_CHAR) + 1);
} catch (Exception e) {
return RefactoringMessages.ExtractMethodPreviewPage_NoSignaturePreviewAvailable;