Add PHPDoc comments and comply with coding style guide