Break up code style rules into separate methods for different style categories.
PHP code style: applied many rules from the Moodle coding style.