php Fatal error: Cannot use lexical variable $eventName as a parameter name in

I have the error as said in title in the following code (guzzle http lib) please tell me how to fix it manually. I have no idea about function() use () construct to be honest so dont know how to fi...