You are here

bad.install in Coder 8.2

Install, update and uninstall functions for the bad module.

File

coder_sniffer/Drupal/Test/bad/bad.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the bad module.
 */

/**
 * Implements hook_schema().
 */
function bad_schema() {
  $schema['good'] = array(
    // We should not use t() here.
    'description' => t('The base table for nodes.'),
    'fields' => array(
      'nid' => array(
        'description' => t('The primary identifier for a node.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'vid' => array(
        'description' => 'The current {node_revision}.vid version identifier.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'type' => array(
        'description' => 'The {node_type} of this node.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'title' => array(
        'description' => 'The title of this node, always treated as non-markup plain text.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}

/**
 * Empty hook_install() is not allowed.
 */
function bad_install() {
}

/**
 * Empty hook_uninstall() is not allowed.
 */
function bad_uninstall() {
}

Functions

Namesort descending Description
bad_install Empty hook_install() is not allowed.
bad_schema Implements hook_schema().
bad_uninstall Empty hook_uninstall() is not allowed.