AppStateESS/InternshipInventory

View on GitHub

Showing 379 of 6,675 total issues

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

    public function getLimitList()
    {
        $values = $this->getLinkValues();
        unset($values['limit']);

Severity: Minor
Found in class/SubselectPager.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

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

    private function getSourceTable($use_as = true)
    {
        if (isset($this->tables[0])) {
            return $this->tables[0];
        } else {
Severity: Minor
Found in class/SubselectDatabase.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

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

    public function execute()
    {
        $searchString = $_REQUEST['searchString'];

        // If there was no search string, return an empty array to avoid front-end errors
Severity: Minor
Found in class/Command/GetSearchSuggestions.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

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

    public function incrementColumn($column_name, $amount = 1)
    {
        $amount = (int) $amount;

        if ($amount == 0) {
Severity: Minor
Found in class/SubselectDatabase.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

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

    public function joinResult($source_column, $join_table, $join_column, $content_column, $new_name=null, $searchable=false)
    {
        // TODO: this will break if you have more than one db pager at a time
        // TODO: make this a private member variable
        static $join_match = null;
Severity: Minor
Found in class/SubselectPager.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

Avoid too many return statements within this function.
Open

            return;
Severity: Major
Found in javascript/editTerms/EditTerms.jsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return;
Severity: Major
Found in javascript/editTerms/EditTerms.jsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return;
Severity: Major
Found in javascript/editTerms/EditTerms.jsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return;
Severity: Major
Found in javascript/editTerms/EditTerms.jsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return;
Severity: Major
Found in javascript/editTerms/EditTerms.jsx - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return null;
Severity: Major
Found in class/SubselectPager.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return false;
Severity: Major
Found in class/SubselectPager.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return PHPWS_Template::process($template, $this->module, $this->template);
Severity: Major
Found in class/SubselectPager.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return $this->_allColumns;
Severity: Major
Found in class/SubselectDatabase.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return $result;
Severity: Major
Found in class/SubselectDatabase.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                        return $result;
Severity: Major
Found in class/SubselectDatabase.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                    return $result;
Severity: Major
Found in class/SubselectDatabase.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return false;
Severity: Major
Found in class/SubselectDatabase.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return PHPWS_Core::plugObject($object, $variables);
Severity: Major
Found in class/SubselectDatabase.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return true;
Severity: Major
Found in class/SubselectDatabase.php - About 30 mins to fix
Severity
Category
Status
Source
Language