keboola/gooddata-php-client

View on GitHub
src/Datasets.php

Summary

Maintainability
D
1 day
Test Coverage

Method getDataLoadManifest has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getDataLoadManifest(
        $identifier,
        array $columns,
        $incrementalLoad = false
    ) {
Severity: Major
Found in src/Datasets.php - About 4 hrs to fix

    Function getDataLoadManifest has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function getDataLoadManifest(
            $identifier,
            array $columns,
            $incrementalLoad = false
        ) {
    Severity: Minor
    Found in src/Datasets.php - About 3 hrs 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 pollEtlTask has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

        private function pollEtlTask($uri)
        {
            $try = 1;
            do {
                sleep(min(pow(2, $try), rand(15, 20)));
    Severity: Minor
    Found in src/Datasets.php - About 2 hrs 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

    File Datasets.php has 252 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * @package gooddata-php-client
     * @copyright Keboola
     * @author Jakub Matejka <jakub@keboola.com>
    Severity: Minor
    Found in src/Datasets.php - About 2 hrs to fix

      Method pollEtlTask has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function pollEtlTask($uri)
          {
              $try = 1;
              do {
                  sleep(min(pow(2, $try), rand(15, 20)));
      Severity: Minor
      Found in src/Datasets.php - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status