Showing 699 of 699 total issues

Tag value indented incorrectly; expected 1 space but found 2
Open

 * @param  object $results

Missing short description in doc comment
Open

/**

Type hint "array" missing for $variables
Open

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

Description for the @return value is missing
Open

 * @return array

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

 * Document _deims_de_flatten_allowed 

Description for the @return value is missing
Open

 * @return array

There must be exactly one blank line after the file comment
Open

 */

Array indentation error, expected 16 spaces but found 17
Open

                 'code' => $key,

Expected 1 space before "="; 0 found
Open

            $attribute['gfc:FC_FeatureAttribute']['gfc:valueMeasurementUnit'][$unitname]['gml:identifier codeSpace=http://unit.lternet.edu']='';

Missing function doc comment
Open

function deims_variable_type_label($type) {

Missing function doc comment
Open

function deims_variable_load_multiple($field_name, array $ids) {

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

   *  Added utf8 encoding to the tidy statment

Public method name "EmlDataSet::setEMLHash" is not in lowerCamel format
Open

  public function setEMLHash($hash) {

Public method name "EmlDataSet::getDOI" is not in lowerCamel format
Open

  public function getDOI() {

Doc comment short description must be on a single line, further text should be a separate paragraph
Open

 * Because it is re-used by other elements.

Avoid too many return statements within this method.
Open

      return array();
Severity: Major
Found in modules/custom/pasta/lib/PastaApi.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

          return array();
    Severity: Major
    Found in modules/custom/pasta/lib/PastaApi.php - About 30 mins to fix

      Function processData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

        public static function processData($data) {
          $seen_nids = &drupal_static('pasta_validation_report_queue_process', array());
      
          // Ensure that on the same request we don't try to fetch the validation
          // report for the same node more than once.
      Severity: Minor
      Found in modules/custom/pasta/lib/PastaValidationReportQueue.php - About 25 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function deleteEml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

        public function deleteEml() {
          list($scope, $identifier) = $this->dataSet->getPackageIDParts();
          $url = static::getApiUrl("package/eml/$scope/$identifier");
          $options = array(
            'method' => 'DELETE',
      Severity: Minor
      Found in modules/custom/pasta/lib/PastaApi.php - About 25 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Severity
      Category
      Status
      Source
      Language