function coder_review_requirements in Coder 7.2
Implements hook_requirements().
File
- coder_review/
coder_review.install, line 36 - Install, update and uninstall functions for the coder_review module.
Code
function coder_review_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
// Load the primary PHP CodeSniffer class.
if (!@(include_once 'PHP/CodeSniffer.php')) {
$missing = TRUE;
}
$t = get_t();
$requirements['coder_review-sniffer'] = array(
'title' => t('Coder Review'),
'value' => empty($missing) ? $t('PHP_CodeSniffer installed.') : $t('PHP_CodeSniffer not installed.'),
'description' => $t('Coder review uses <a href="!php-url">PHP_CodeSniffer</a> to perform better code review checks; Code_Sniffer is not a requirement, but it is helpful. Use "<a href="!drush-url">drush</a> install-php-code-sniffer" to help install.', array(
'!php-url' => 'http://pear.php.net/package/PHP_CodeSniffer',
'!drush-url' => 'http://drupal.org/project/drush',
)),
'severity' => empty($missing) ? REQUIREMENT_OK : REQUIREMENT_WARNING,
);
}
return $requirements;
}