You are here

function _coder_review_drush_get_option_no in Coder 7.2

Determines if a specific option is explicitly disabled.

Options can be disabled several ways in drush: --no-option --option=0 --option=no --option=off

Parameters

string $option: A drush command option as a string.

Return value

bool TRUE if the specific option is disabled; otherwise, FALSE.

3 calls to _coder_review_drush_get_option_no()
coder_review_print_drush_messages in coder_review/coder_review.drush.inc
Prints Coder review messages in a format for drush use.
drush_coder_review in coder_review/coder_review.drush.inc
Performs the actual review for drush.
theme_drush_coder_review in coder_review/coder_review.drush.inc
Returns the results and filenames of a review in a format for drush use.

File

coder_review/coder_review.drush.inc, line 528
Command line utility support for Coder_review module.

Code

function _coder_review_drush_get_option_no($option) {
  if (drush_get_option("no-{$option}")) {
    return TRUE;
  }
  $enabled = drush_get_option($option);
  return $enabled === '0' || $enabled === 'no' || $enabled === 'off';
}