You forgot to close a parenthesis, so from the last open parenthesis, PHP considers all the code that follows as part of a specific block (condition, arguments of functions etc) that does not end. You ...
I'm not familiar at all with SharePoint, I'm not sure if I'm posting my question on the good forum but as the main subject is SharePoint, I'm posting here, with my ...