/** * Render the report; respects drush options. */ public function render() { if (empty($this->checks)) { return; } if (drush_get_option('html')) { $command = drush_get_command(); if (drush_get_option('bootstrap') && $command['command'] != 'audit_all') { echo file_get_contents(SITE_AUDIT_BASE_PATH . '/html/header.html'); } echo $this->toHtml(); if (drush_get_option('bootstrap') && $command['command'] != 'audit_all') { echo file_get_contents(SITE_AUDIT_BASE_PATH . '/html/footer.html'); } } elseif (drush_get_option('json')) { echo $this->toJson(); } else { $this->toDrush(); } }
private function isReset() { return !!Drupal::config(static::$module . '.settings')->get('reset') || 'cli' === PHP_SAPI && function_exists('drush_get_command') && 'cache-rebuild' === drush_get_command()['command']; }