Showing 247 of 247 total issues

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

    private function cleanFilters($searchFilters)
    {
        $query = array();
        $exclude = array(
            'count',
Severity: Minor
Found in app/resto/core/RestoFeatureCollection.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 answer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function answer($response, $responseStatus)
    {
        if (isset($response)) {
            /*
             * HTTP 1.1 headers
Severity: Minor
Found in app/resto/core/Resto.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 updateExtent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateExtent($collection, $extentArrays)
    {
        if (! isset($extentArrays)) {
            return false;
        }
Severity: Minor
Found in app/resto/core/dbfunctions/CollectionsFunctions.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 getPaging has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function getPaging($count, $limit, $offset)
    {
        $count['returned'] = count($this->restoFeatures);

        /*
Severity: Minor
Found in app/resto/core/RestoFeatureCollection.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 corsIsAllowed has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function corsIsAllowed($httpOrigin)
    {
        /*
         * No white list => all allowed
         */
Severity: Minor
Found in app/resto/core/Resto.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 removeGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function removeGroup($params)
    {
        if (! isset($params['id'])) {
            RestoLogUtil::httpError(400, 'Missing mandatory group identifier');
        }
Severity: Minor
Found in app/resto/core/dbfunctions/GroupsFunctions.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 prepareFilterQueryKeywords has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function prepareFilterQueryKeywords($featureTableName, $filterName, $searchTerms, $exclusion)
    {
        $terms = array();
        $filters = array(
            'with' => array(),
Severity: Minor
Found in app/resto/core/dbfunctions/FiltersFunctions.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