modules/custom/deims_data_explorer/deims_data_explorer.pages.inc

Summary

Maintainability
Test Coverage

deims_data_explorer_download accesses the super-global variable $_GET.
Open

function deims_data_explorer_download($node, $file) {
  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], $_GET['q'])) {
    return MENU_ACCESS_DENIED;
  }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

deims_data_explorer_download accesses the super-global variable $_GET.
Open

function deims_data_explorer_download($node, $file) {
  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], $_GET['q'])) {
    return MENU_ACCESS_DENIED;
  }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

deims_data_explorer_download accesses the super-global variable $_GET.
Open

function deims_data_explorer_download($node, $file) {
  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], $_GET['q'])) {
    return MENU_ACCESS_DENIED;
  }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
Open

  $header  = array(

Expected 1 space after FUNCTION keyword; 0 found
Open

  return array_filter($variables, function($variable) {

Missing parameter comment
Open

 * @param array $columns

Description for the @return value is missing
Open

 * @return int

Doc comment parameter name "$node." must not end with a dot
Open

 * @param object $node.

The $text argument to l() should be enclosed within t() so that it is translatable
Open

      '#markup' => '<p>' . l('Return to data set', "node/{$node->nid}") . '</p>',

Type hint "array" missing for $rows_array
Open

function deims_data_explorer_generate_preview($columns_array, $rows_array, $total_rows = 0) {

Type hint "array" missing for $variables
Open

function _deims_de_flatten_allowed($variables) {

Description for the @return value is missing
Open

 * @return array

Type hint "array" missing for $form_state
Open

function _deims_de_prep_variable($variable, $form_state) {

Doc comment short description must end with a full stop
Open

 * Description _deims_prep_list prepares the code-value pairs

Missing parameter comment
Open

 * @param object $node

Line indented incorrectly; expected 10 spaces, found 11
Open

           drupal_set_message('This is a very large data set. Please ' . l('contact us', 'contact') .

Parameter comment must end with a full stop
Open

 *   Contains the actual data rows

Type hint "array" missing for $variable
Open

function _deims_de_prep_codes($variable) {

Type hint "array" missing for $variable
Open

function _deims_de_prep_nominal($variable) {

Description for the @return value is missing
Open

 * @return null|string

Line indented incorrectly; expected 6 spaces, found 8
Open

        break;

If the line declaring an array spans longer than 80 characters, each element should be broken into its own line
Open

              array('_process_file_for_download', array($file, $connection['table'], $form_state['values']['nid'])),

Parameter comment must end with a full stop
Open

 *   Contains data about the columns

Type hint "array" missing for $columns
Open

function _deims_de_get_submitted_filters($columns) {

Doc comment short description must end with a full stop
Open

 * Description _deims_de_prep_physical : Prepares physical variable type

Doc comment for parameter $columns does not match actual variable name $node
Open

 * @param array $columns

Doc comment short description must end with a full stop
Open

 * Description for deims_data_explorer_generate_preview : creates a preview of the resultset

Parameter comment must end with a full stop
Open

 *   Contains the total number of rows for the resultset

Type hint "array" missing for $variables
Open

function _deims_de_get_allowed_filters($variables) {

Closing brace must be on a line by itself
Open

    return $value['name']; }, 

Parameter comment indentation must be 3 spaces, found 2 spaces
Open

 *  The array containing the code value pairs.

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

  // }

Description for the @return value is missing
Open

 * @return array

Parameter comment indentation must be 3 spaces, found 2 spaces
Open

 *  The array containing the form_state.

Type hint "array" missing for $variable
Open

function _deims_de_prep_variable($variable, $form_state) {

Doc comment short description must end with a full stop
Open

 * Description _deims_de_prep_nominal : Prepares the nominal variables

Type hint "array" missing for $variable
Open

function _deims_de_prep_date($variable, $form_state) {

Description for the @return value is missing
Open

 * @return array

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

  // if ($type == 'datetime') {

Description for the @return value is missing
Open

 * @return mixed

Inline comments must start with a capital letter
Open

  // foreach ($form_state['values'] as $key => $value) {

Type hint "array" missing for $columns_array
Open

function deims_data_explorer_generate_preview($columns_array, $rows_array, $total_rows = 0) {

Return type must not contain variable name "$markup"
Open

 * @return string $markup

Description for the @return value is missing
Open

 * @return array

Type hint "array" missing for $columns
Open

function _deims_de_get_submitted_columns($columns) {

Doc comment short description must end with a full stop
Open

 * Description _deims_de_prep_variable prepares the varianble

Parameter comment must end with a full stop
Open

 *   Contains the string value for the nominal variable types

Parameter comment must end with a full stop
Open

 *   Contains the data array

Separate the @param and @return sections by a blank line.
Open

 * @return null|string

Case breaking statements must be followed by a single blank line
Open

        return $form;

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

  // $allowed_filters = array_intersect($allowed_columns, array_keys($schema[$connection['table']]));

Functions must not contain multiple empty lines in a row; found 2 empty lines
Open


Separate the @param and @return sections by a blank line.
Open

 * @return array 

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

  // unset($form_state['values']['submit'], $form_state['values']['form_id'], $form_state['values']['op'], $form_state['values']['form_token'], $form_state['values']['form_build_id']);

Expected 1 space after FUNCTION keyword; 0 found
Open

  return array_filter($variables, function($variable) {

Line indented incorrectly; expected 2 spaces, found 4
Open

    // drupal_set_message(t('%name has value %value', array('%name' => $key, '%value' => print_r($value, TRUE))));

Doc comment short description must end with a full stop
Open

 * Document _deims_de_flatten_allowed 

Additional blank lines found at end of doc comment
Open

 */

Line indented incorrectly; expected 2 spaces, found 4
Open

    $element['#attached']['css'][] = libraries_get_path('jquery-ui-timepicker') . '/jquery-ui-timepicker-addon.css';

Concat operator must be surrounded by a single space
Open

    of <strong>'. $total_rows . '</strong> records';

Return type must not contain variable name "$query"
Open

 * @return object $query

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

  // }

Line indented incorrectly; expected 2 spaces, found 0
Open

c

Separate the @param and @return sections by a blank line.
Open

 * @return string $markup

Doc comment short description must end with a full stop
Open

 * Document _deims_de_get_allowed_filters : Passes the allowed filters

Missing parameter comment
Open

 * @param array $variables

Missing parameter comment
Open

 * @param array $variables

Type hint "array" missing for $variable
Open

function _deims_de_prep_physical($variable) {

Parameter tags must be grouped together in a doc comment
Open

 * @param array $form_state

Type hint "array" missing for $form_state
Open

function _deims_de_prep_date($variable, $form_state) {

Inline comments must start with a capital letter
Open

  // if ($type == 'datetime') {

Doc comment short description must end with a full stop
Open

 * Describe _deims_de_array2csv : prepares the in-array data to be packaged in csv

TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
Open

  $count = null;

Parameter comment must end with a full stop
Open

 *   Contains the configured array of variables

Doc comment short description must end with a full stop
Open

 * Document _deims_de_get_submitted_filters : Passes the chosen filters

Missing parameter comment
Open

 * @param array $columns

Separate the @param and @return sections by a blank line.
Open

 * @return object $query

Parameter comment indentation must be 3 spaces, found 2 spaces
Open

 *  The array containing the code value pairs.

Line indented incorrectly; expected 2 spaces, found 4
Open

    $element['#attached']['js'][] = libraries_get_path('jquery-ui-timepicker') . '/jquery-ui-timepicker-addon.js';

Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
Open

  $variables  = field_get_items('node', $node, 'field_variables');

Type hint "array" missing for $form_state
Open

function deims_data_explorer_form($form, &$form_state, $variables, $connection, $node) {

Type hint "array" missing for $variables
Open

function deims_data_explorer_form($form, &$form_state, $variables, $connection, $node) {

The $text argument to l() should be enclosed within t() so that it is translatable
Open

           drupal_set_message('This is a very large data set. Please ' . l('contact us', 'contact') .

If the line declaring an array spans longer than 80 characters, each element should be broken into its own line
Open

              array('_process_file_for_download', array($file, $connection['table'], $form_state['values']['nid'])),

Description for the @return value is missing
Open

 * @return array

There should be no white space before a closing "}"
Open

    return $value['name']; }, 

Parameter comment must end with a full stop
Open

 *   Contains details about the quantitative variables

Missing short description in doc comment
Open

/**

Type hint "array" missing for $variables
Open

function _deims_de_get_allowed_columns($variables) {

Whitespace found at end of line
Open

    return $value['name']; }, 

Whitespace found at end of line
Open

 * @return array 

Whitespace found at end of line
Open

  return array_map(function ($value) { 

Whitespace found at end of line
Open

        } 

Whitespace found at end of line
Open

 * Document _deims_de_flatten_allowed 

There are no issues that match your filters.

Category
Status