I got the following error :

parse error, unexpected tUMINUS_NUM

  userCredential.flagged? ? return -1 : return 1

what's wrong ?

I tried also

userCredential.flagged? ? return (-1) : return 1

same problem.....