hisamu/php-xbase

View on GitHub

Showing 29 of 29 total issues

Avoid too many return statements within this method.
Open

                return parent::set($columnName, $value);
Severity: Major
Found in src/Record/VisualFoxproRecord.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return new DBaseDataConverter($table, $encoder);
    Severity: Major
    Found in src/Record/RecordFactory.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return $this->setNum($column, $value);
      Severity: Major
      Found in src/Record/AbstractRecord.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return $this;
        Severity: Major
        Found in src/Record/AbstractRecord.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return $this->setMemo($column, $value);
          Severity: Major
          Found in src/Record/AbstractRecord.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return $this->setGeneral($column, $value);
            Severity: Major
            Found in src/Record/VisualFoxproRecord.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return $this->setFloat($column, $value);
              Severity: Major
              Found in src/Record/VisualFoxproRecord.php - About 30 mins to fix

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

                    protected function readColumns(): void
                    {
                        [$columnsCount, $terminatorLength] = $this->pickColumnsCount();
                
                        /* some checking */
                Severity: Minor
                Found in src/Header/Reader/AbstractHeaderReader.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 squeeze has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function squeeze(): array
                    {
                        $pointers = array_column($this->blocksToDelete, 0);
                        array_multisort($pointers, SORT_ASC, $this->blocksToDelete);
                
                
                Severity: Minor
                Found in src/BlocksMerger.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