Created
November 26, 2014 06:41
-
-
Save Mizpah/af902c3d2a2d19b54bbd to your computer and use it in GitHub Desktop.
The array, returning an error from code sniffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_node_info(). | |
*/ | |
function genima_log_node_info() { | |
// Returns an array defining a new node type. | |
return array( | |
'logged_item' => array( | |
'name' => t('Logged Item'), | |
'base' => 'genima_logged_item', | |
'description' => t('A content type for logging items for use in Genima Log'), | |
'help' => t('Add logged items, actions, notes, bugs and fixes here'), | |
'has_title' => TRUE, | |
'title_label' => t('Logged entry title'), | |
'locked' = TRUE, | |
), | |
); | |
} |
Change 'locked' = TRUE, to 'locked' => TRUE,
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whats the cause / fix to this?
The code above follow this example:
https://api.drupal.org/api/drupal/modules%21node%21node.api.php/function/hook_node_info/7
Am trying to work out why code sniffer (with Drupal standards is getting upset) ?!
PHP_CodeSniffer found at least one issue. [error]
Martins-MacBook-Pro-2:genimalog martindean$ drush dcs
FILE: ...Sites/drupal-core/sites/all/modules/custom/genima_log/genima_log.module
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
35 | ERROR | No key specified for array entry; first entry specifies key