Showing 699 of 699 total issues

Expected 2 space(s) before asterisk; 1 found
Open

 *

There must be no blank lines after the function comment
Open

 */

Missing function doc comment
Open

  public function __construct($node) {

Expected 2 space(s) before asterisk; 1 found
Open

 * @file

There must be exactly one blank line before the tags in a doc comment
Open

 * @see http://api.drupal.org/api/drupal/modules%21node%21node.module/function/node_feed/7

Missing function doc comment
Open

  public function __construct($node) {

The PHP open tag must be followed by exactly one blank line
Open

<?php

Missing function doc comment
Open

function _iso_date_value($date, $granularity) {

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

 * by other elements.

Missing class doc comment
Open

class LterUnitHelper {

Function fetchEmlReport has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  public function fetchEmlReport() {

    list($scope, $identifier, $revision) = $this->dataSet->getPackageIDParts();

    // Fetch the EML report from the API.
Severity: Minor
Found in modules/custom/pasta/lib/PastaApi.php - About 35 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

Public method name "EmlHarvestList::getEMLHL" is not in lowerCamel format
Open

  public function getEMLHL($reset = FALSE) {

Expected 2 space(s) before asterisk; 1 found
Open

 *  Default template to use when an entity is rendered using the 'iso' view mode.

Additional blank lines found at end of doc comment
Open

   */

Missing function doc comment
Open

  public function submitEml() {

Closing brace indented incorrectly; expected 2 spaces, found 0
Open

}

Public method name "PastaApi::fetchDOI" is not in lowerCamel format
Open

  public function fetchDOI() {

Expected 2 space(s) before asterisk; 3 found
Open

   *   An integer from the PASTA API.

Line indented incorrectly; expected 10 spaces, found 11
Open

           $element[$delta] = array(

Expected 1 space(s) before asterisk; 2 found
Open

  * Implement hook_help()
Severity
Category
Status
Source
Language