modules/custom/deims_data_explorer/deims_data_explorer.pages.inc
deims_data_explorer_download accesses the super-global variable $_GET. Open
Open
function deims_data_explorer_download($node, $file) {
if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], $_GET['q'])) {
return MENU_ACCESS_DENIED;
}
- Read upRead up
- Exclude checks
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
Open
function deims_data_explorer_download($node, $file) {
if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], $_GET['q'])) {
return MENU_ACCESS_DENIED;
}
- Read upRead up
- Exclude checks
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
Open
function deims_data_explorer_download($node, $file) {
if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], $_GET['q'])) {
return MENU_ACCESS_DENIED;
}
- Read upRead up
- Exclude checks
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
Open
$header = array(
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
return array_filter($variables, function($variable) {
- Exclude checks
Missing parameter comment Open
Open
* @param array $columns
- Exclude checks
Description for the @return value is missing Open
Open
* @return int
- Exclude checks
Doc comment parameter name "$node." must not end with a dot Open
Open
* @param object $node.
- Exclude checks
The $text argument to l() should be enclosed within t() so that it is translatable Open
Open
'#markup' => '<p>' . l('Return to data set', "node/{$node->nid}") . '</p>',
- Exclude checks
Type hint "array" missing for $rows_array Open
Open
function deims_data_explorer_generate_preview($columns_array, $rows_array, $total_rows = 0) {
- Exclude checks
Type hint "array" missing for $variables Open
Open
function _deims_de_flatten_allowed($variables) {
- Exclude checks
Description for the @return value is missing Open
Open
* @return array
- Exclude checks
Type hint "array" missing for $form_state Open
Open
function _deims_de_prep_variable($variable, $form_state) {
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Description _deims_prep_list prepares the code-value pairs
- Exclude checks
Missing parameter comment Open
Open
* @param object $node
- Exclude checks
Line indented incorrectly; expected 10 spaces, found 11 Open
Open
drupal_set_message('This is a very large data set. Please ' . l('contact us', 'contact') .
- Exclude checks
Parameter comment must end with a full stop Open
Open
* Contains the actual data rows
- Exclude checks
Type hint "array" missing for $variable Open
Open
function _deims_de_prep_codes($variable) {
- Exclude checks
Type hint "array" missing for $variable Open
Open
function _deims_de_prep_nominal($variable) {
- Exclude checks
Description for the @return value is missing Open
Open
* @return null|string
- Exclude checks
Line indented incorrectly; expected 6 spaces, found 8 Open
Open
break;
- Exclude checks
If the line declaring an array spans longer than 80 characters, each element should be broken into its own line Open
Open
array('_process_file_for_download', array($file, $connection['table'], $form_state['values']['nid'])),
- Exclude checks
Parameter comment must end with a full stop Open
Open
* Contains data about the columns
- Exclude checks
Type hint "array" missing for $columns Open
Open
function _deims_de_get_submitted_filters($columns) {
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Description _deims_de_prep_physical : Prepares physical variable type
- Exclude checks
Doc comment for parameter $columns does not match actual variable name $node Open
Open
* @param array $columns
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Description for deims_data_explorer_generate_preview : creates a preview of the resultset
- Exclude checks
Parameter comment must end with a full stop Open
Open
* Contains the total number of rows for the resultset
- Exclude checks
Type hint "array" missing for $variables Open
Open
function _deims_de_get_allowed_filters($variables) {
- Exclude checks
Closing brace must be on a line by itself Open
Open
return $value['name']; },
- Exclude checks
Parameter comment indentation must be 3 spaces, found 2 spaces Open
Open
* The array containing the code value pairs.
- Exclude checks
Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses Open
Open
// }
- Exclude checks
Description for the @return value is missing Open
Open
* @return array
- Exclude checks
Parameter comment indentation must be 3 spaces, found 2 spaces Open
Open
* The array containing the form_state.
- Exclude checks
Type hint "array" missing for $variable Open
Open
function _deims_de_prep_variable($variable, $form_state) {
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Description _deims_de_prep_nominal : Prepares the nominal variables
- Exclude checks
Type hint "array" missing for $variable Open
Open
function _deims_de_prep_date($variable, $form_state) {
- Exclude checks
Description for the @return value is missing Open
Open
* @return array
- Exclude checks
Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses Open
Open
// if ($type == 'datetime') {
- Exclude checks
Description for the @return value is missing Open
Open
* @return mixed
- Exclude checks
Inline comments must start with a capital letter Open
Open
// foreach ($form_state['values'] as $key => $value) {
- Exclude checks
Type hint "array" missing for $columns_array Open
Open
function deims_data_explorer_generate_preview($columns_array, $rows_array, $total_rows = 0) {
- Exclude checks
Return type must not contain variable name "$markup" Open
Open
* @return string $markup
- Exclude checks
Description for the @return value is missing Open
Open
* @return array
- Exclude checks
Type hint "array" missing for $columns Open
Open
function _deims_de_get_submitted_columns($columns) {
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Description _deims_de_prep_variable prepares the varianble
- Exclude checks
Parameter comment must end with a full stop Open
Open
* Contains the string value for the nominal variable types
- Exclude checks
Parameter comment must end with a full stop Open
Open
* Contains the data array
- Exclude checks
Separate the @param and @return sections by a blank line. Open
Open
* @return null|string
- Exclude checks
Case breaking statements must be followed by a single blank line Open
Open
return $form;
- Exclude checks
Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses Open
Open
// $allowed_filters = array_intersect($allowed_columns, array_keys($schema[$connection['table']]));
- Exclude checks
Functions must not contain multiple empty lines in a row; found 2 empty lines Open
Open
- Exclude checks
Separate the @param and @return sections by a blank line. Open
Open
* @return array
- Exclude checks
Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses Open
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']);
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
return array_filter($variables, function($variable) {
- Exclude checks
Line indented incorrectly; expected 2 spaces, found 4 Open
Open
// drupal_set_message(t('%name has value %value', array('%name' => $key, '%value' => print_r($value, TRUE))));
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Document _deims_de_flatten_allowed
- Exclude checks
Additional blank lines found at end of doc comment Open
Open
*/
- Exclude checks
Line indented incorrectly; expected 2 spaces, found 4 Open
Open
$element['#attached']['css'][] = libraries_get_path('jquery-ui-timepicker') . '/jquery-ui-timepicker-addon.css';
- Exclude checks
Concat operator must be surrounded by a single space Open
Open
of <strong>'. $total_rows . '</strong> records';
- Exclude checks
Return type must not contain variable name "$query" Open
Open
* @return object $query
- Exclude checks
Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses Open
Open
// }
- Exclude checks
Line indented incorrectly; expected 2 spaces, found 0 Open
Open
c
- Exclude checks
Separate the @param and @return sections by a blank line. Open
Open
* @return string $markup
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Document _deims_de_get_allowed_filters : Passes the allowed filters
- Exclude checks
Missing parameter comment Open
Open
* @param array $variables
- Exclude checks
Missing parameter comment Open
Open
* @param array $variables
- Exclude checks
Type hint "array" missing for $variable Open
Open
function _deims_de_prep_physical($variable) {
- Exclude checks
Parameter tags must be grouped together in a doc comment Open
Open
* @param array $form_state
- Exclude checks
Type hint "array" missing for $form_state Open
Open
function _deims_de_prep_date($variable, $form_state) {
- Exclude checks
Inline comments must start with a capital letter Open
Open
// if ($type == 'datetime') {
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Describe _deims_de_array2csv : prepares the in-array data to be packaged in csv
- Exclude checks
TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null" Open
Open
$count = null;
- Exclude checks
Parameter comment must end with a full stop Open
Open
* Contains the configured array of variables
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Document _deims_de_get_submitted_filters : Passes the chosen filters
- Exclude checks
Missing parameter comment Open
Open
* @param array $columns
- Exclude checks
Separate the @param and @return sections by a blank line. Open
Open
* @return object $query
- Exclude checks
Parameter comment indentation must be 3 spaces, found 2 spaces Open
Open
* The array containing the code value pairs.
- Exclude checks
Line indented incorrectly; expected 2 spaces, found 4 Open
Open
$element['#attached']['js'][] = libraries_get_path('jquery-ui-timepicker') . '/jquery-ui-timepicker-addon.js';
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces Open
Open
$variables = field_get_items('node', $node, 'field_variables');
- Exclude checks
Type hint "array" missing for $form_state Open
Open
function deims_data_explorer_form($form, &$form_state, $variables, $connection, $node) {
- Exclude checks
Type hint "array" missing for $variables Open
Open
function deims_data_explorer_form($form, &$form_state, $variables, $connection, $node) {
- Exclude checks
The $text argument to l() should be enclosed within t() so that it is translatable Open
Open
drupal_set_message('This is a very large data set. Please ' . l('contact us', 'contact') .
- Exclude checks
If the line declaring an array spans longer than 80 characters, each element should be broken into its own line Open
Open
array('_process_file_for_download', array($file, $connection['table'], $form_state['values']['nid'])),
- Exclude checks
Description for the @return value is missing Open
Open
* @return array
- Exclude checks
There should be no white space before a closing "}" Open
Open
return $value['name']; },
- Exclude checks
Parameter comment must end with a full stop Open
Open
* Contains details about the quantitative variables
- Exclude checks
Missing short description in doc comment Open
Open
/**
- Exclude checks
Type hint "array" missing for $variables Open
Open
function _deims_de_get_allowed_columns($variables) {
- Exclude checks
Whitespace found at end of line Open
Open
return $value['name']; },
- Exclude checks
Whitespace found at end of line Open
Open
* @return array
- Exclude checks
Whitespace found at end of line Open
Open
return array_map(function ($value) {
- Exclude checks
Whitespace found at end of line Open
Open
}
- Exclude checks
Whitespace found at end of line Open
Open
* Document _deims_de_flatten_allowed
- Exclude checks