PSR code formatting, phpdocs

Hi, I made some code formatting according to PSR code style and used some phpdocs for more readability and IDE friendliness. No functional changes except dropping one unused argument in Authenticator::cookieIsValid(). $credential was not used is this function.

Please merge, if you're happy with it.

Regards,
Bartosz