Hello, I'm using OG Access, and before using any module, I always take a look at the code :) I saw that you use a set of constants for variables, which is a good practice, but in the form that present those variables to site admin generation, you don't use the constants in options arrays, and rely on PHP array default behavior which is using numeric keys.

It work great, but I think that forcing the constants to be the array keys improves greatly the code readability and ensure the right behavior if some day you change any of those constants, or add / remove options, or just change their order in the code.

This is a pure code readability patch, it does include any bugfix (code works great), it does not change any behavior.

If you don't think so, please let me know why, I'm curious and it isn't too late to learn :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pounard’s picture

Title: og_access.module forms typo enhancements » OG Access settings form typo enhancements

Change title for better readability.