Replace ->uid() with ->id(), isAuthenticated() and isAnonymous()
fix syntax error