Adhere to WP coding standards

Coding standard corrections for brace style, indentation, naming conventions, space usage, and yoda conditions.