tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php

Summary

Maintainability
F
6 days
Test Coverage
F
0%

Function parseGFF3Line has a Cognitive Complexity of 81 (exceeds 7 allowed). Consider refactoring.
Open

  private function parseGFF3Line($line) {

    // get the columns
    $cols = explode("\t", $line);
    if (sizeof($cols) != 9) {
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 day 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 findFeatures has a Cognitive Complexity of 36 (exceeds 7 allowed). Consider refactoring.
Open

  private function findFeatures() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 5 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 findSynonyms has a Cognitive Complexity of 26 (exceeds 7 allowed). Consider refactoring.
Open

  private function findSynonyms() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 addMissingProteins has a Cognitive Complexity of 24 (exceeds 7 allowed). Consider refactoring.
Open

  private function addMissingProteins() {
    $this->setItemsHandled(0);
    $this->setTotalItems(count(array_keys($this->proteins)));

    // Second, iterate through the protein list and for any parents that
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 parseGFF3 has a Cognitive Complexity of 21 (exceeds 7 allowed). Consider refactoring.
Open

  private function parseGFF3() {
    $filesize = filesize($this->gff_file);
    $this->setTotalItems($filesize);

    // Holds a unique list of cvterms for later lookup.
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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

Function insertFeatureParents has a Cognitive Complexity of 20 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureParents(){
    $chado = $this->getChadoConnection();
    $batch_size = 100;
    $num_parents = count(array_keys($this->parent_lookup));
    $num_batches = (int) ($num_parents / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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

Function findMissingProteins has a Cognitive Complexity of 19 (exceeds 7 allowed). Consider refactoring.
Open

  private function findMissingProteins() {
    $this->setItemsHandled(0);
    $this->setTotalItems(count(array_keys($this->features)));

    // Don't do anything if the user wants to skip creation of non listed
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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

Function run has a Cognitive Complexity of 19 (exceeds 7 allowed). Consider refactoring.
Open

  public function run() {
    $chado = $this->getChadoConnection();

    $arguments = $this->arguments['run_args'];
    $this->gff_file = $this->arguments['files'][0]['file_path'];
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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

Function prepareFeature has a Cognitive Complexity of 19 (exceeds 7 allowed). Consider refactoring.
Open

  private function prepareFeature($gff_feature, &$feature_cvterms, &$featureprop_cvterms) {

    // Add the landmark if it doesn't exist in the landmark list.
    if (!array_key_exists($gff_feature['landmark'], $this->landmarks)) {
      $this->landmarks[$gff_feature['landmark']] = FALSE;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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

Function getFeatureNames has a Cognitive Complexity of 17 (exceeds 7 allowed). Consider refactoring.
Open

  private function getFeatureNames($attrs, $type, $landmark_name, $fmin, $fmax) {
    $uniquename = '';
    $name = '';

    if (!array_key_exists('ID', $attrs) and !array_key_exists('Name', $attrs)) {
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 hr 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 insertFeatureProps has a Cognitive Complexity of 15 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureProps(){
    $chado = $this->getChadoConnection();
    $batch_size = 100;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 hr 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 insertFeatureSeqs has a Cognitive Complexity of 13 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureSeqs() {

    $num_residues = count(array_keys($this->residue_index));

    $this->setItemsHandled(0);
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 hr 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 findLandmarks has a Cognitive Complexity of 12 (exceeds 7 allowed). Consider refactoring.
Open

  private function findLandmarks() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_landmarks = count(array_keys($this->landmarks));
    $num_batches = (int) ($num_landmarks / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 hr 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 insertLandmarks has a Cognitive Complexity of 12 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertLandmarks() {
    foreach ($this->landmarks as $uniquename => $feature_id) {
      // If the landmark does not have an entry in the GFF lines, try to
      // find or add it.
      if ($feature_id === FALSE) {
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 hr 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 insertFeatureDerivesFrom has a Cognitive Complexity of 12 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureDerivesFrom() {
    $chado = $this->getChadoConnection();
    $batch_size = 100;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 hr 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 insertFeatureAnalysis has a Cognitive Complexity of 12 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureAnalysis() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 1 hr 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 insertFeatureSynonyms has a Cognitive Complexity of 11 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureSynonyms(){
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 55 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 insertFeatureCVterms has a Cognitive Complexity of 11 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureCVterms() {
    $chado = $this->getChadoConnection();
    $batch_size = 100;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 55 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 insertFeatureDbxrefs has a Cognitive Complexity of 11 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureDbxrefs() {
    $chado = $this->getChadoConnection();
    $batch_size = 100;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 55 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 findDbxrefs has a Cognitive Complexity of 10 (exceeds 7 allowed). Consider refactoring.
Open

  private function findDbxrefs() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_dbxrefs = count(array_keys($this->dbxref_lookup));
    $num_batches = (int) ($num_dbxrefs / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 45 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 prepSynonms has a Cognitive Complexity of 10 (exceeds 7 allowed). Consider refactoring.
Open

  private function prepSynonms() {
    // make sure we have a 'synonym_type' vocabulary
    $select = ['name' => 'synonym_type'];
    $results = chado_select_record('cv', ['*'], $select);

Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.php - About 45 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 associateChildren has a Cognitive Complexity of 9 (exceeds 7 allowed). Consider refactoring.
Open

  private function associateChildren() {
    $this->setItemsHandled(0);
    $this->setTotalItems(count(array_keys($this->features)));

    // Iterate through parent-child relationships and set the ranks.
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 prepDBs has a Cognitive Complexity of 9 (exceeds 7 allowed). Consider refactoring.
Open

  private function prepDBs() {

    // Get the list of database records that are needed by this GFF file. If
    // they do not exist then add them.
    foreach (array_keys($this->db_lookup) as $dbname) {
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 insertSynonyms has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertSynonyms() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_synonyms = count(array_keys($this->synonym_lookup));
    $num_batches = (int) ($num_synonyms / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 getTypeID has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

  private function getTypeID($type, $is_prop_type) {
    $chado = $this->getChadoConnection();

    $cv = $this->feature_cv;
    if ($is_prop_type) {
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 insertFeatures has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatures() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 insertDbxrefs has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertDbxrefs() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_dbxrefs = count(array_keys($this->dbxref_lookup));
    $num_batches = (int) ($num_dbxrefs / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 insertFeatureTargets has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureTargets() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 deleteFeatureData has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

  private function deleteFeatureData() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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 insertFeatureLocs has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

  private function insertFeatureLocs() {
    $chado = $this->getChadoConnection();
    $batch_size = 1000;
    $num_features = count(array_keys($this->features));
    $num_batches = (int) ($num_features / $batch_size) + 1;
Severity: Minor
Found in tripal_chado/src/Plugin/TripalImporter/GFF3Importer.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

There are no issues that match your filters.

Category
Status