$reason undefined

Though strictly not an error, PHPStorm's Code Inspector is flagging $reason as an undefined variable.

I've renamed it $failureReason and defined before it is referenced.