KarrLab/SynNetGen

View on GitHub

Showing 36 of 39 total issues

Method filter_results has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function filter_results($docs,&$requiredWords,&$forbiddenWords)
{
  $filteredDocs=array();
  while (list ($key, $val) = each ($docs)) 
  {
Severity: Minor
Found in lib/m2html/templates/brain/doxysearch.php - About 1 hr to fix

    Function main has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    function main($idxfile)
    {
      if(strcmp('4.1.0', phpversion()) > 0) 
      {
        die("Error: PHP version 4.1.0 or above required!");
    Severity: Minor
    Found in lib/m2html/templates/blue/doxysearch.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 main has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    function main($idxfile)
    {
      if(strcmp('4.1.0', phpversion()) > 0) 
      {
        die("Error: PHP version 4.1.0 or above required!");
    Severity: Minor
    Found in lib/m2html/templates/frame/doxysearch.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 main has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    function main($idxfile)
    {
      if(strcmp('4.1.0', phpversion()) > 0) 
      {
        die("Error: PHP version 4.1.0 or above required!");
    Severity: Minor
    Found in lib/m2html/templates/brain/doxysearch.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

    Method combine_results has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function combine_results($results,&$docs)
    {
      foreach ($results as $wordInfo)
      {
        $docsList = &$wordInfo["docs"];
    Severity: Minor
    Found in lib/m2html/templates/blue/doxysearch.php - About 1 hr to fix

      Method combine_results has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function combine_results($results,&$docs)
      {
        foreach ($results as $wordInfo)
        {
          $docsList = &$wordInfo["docs"];
      Severity: Minor
      Found in lib/m2html/templates/brain/doxysearch.php - About 1 hr to fix

        Method combine_results has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function combine_results($results,&$docs)
        {
          foreach ($results as $wordInfo)
          {
            $docsList = &$wordInfo["docs"];
        Severity: Minor
        Found in lib/m2html/templates/frame/doxysearch.php - About 1 hr to fix

          Avoid deeply nested control flow statements.
          Open

                    if ($statInfo["full"]) $totalfreq+=$freq;
          Severity: Major
          Found in lib/m2html/templates/frame/doxysearch.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                      if ($statInfo["full"]) $totalfreq+=$freq;
            Severity: Major
            Found in lib/m2html/templates/brain/doxysearch.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                        if ($statInfo["full"]) $totalfreq+=$freq;
              Severity: Major
              Found in lib/m2html/templates/blue/doxysearch.php - About 45 mins to fix

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

                function combine_results($results,&$docs)
                {
                  foreach ($results as $wordInfo)
                  {
                    $docsList = &$wordInfo["docs"];
                Severity: Minor
                Found in lib/m2html/templates/brain/doxysearch.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 combine_results has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                function combine_results($results,&$docs)
                {
                  foreach ($results as $wordInfo)
                  {
                    $docsList = &$wordInfo["docs"];
                Severity: Minor
                Found in lib/m2html/templates/frame/doxysearch.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 report_results has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                function report_results(&$docs)
                {
                  echo "<table cellspacing=\"2\">\n";
                  echo "  <tr>\n";
                  echo "    <td colspan=\"2\"><h2>Search Results</h2></td>\n";
                Severity: Minor
                Found in lib/m2html/templates/blue/doxysearch.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 report_results has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                function report_results(&$docs)
                {
                  echo "<table cellspacing=\"2\">\n";
                  echo "  <tr>\n";
                  echo "    <td colspan=\"2\"><h2>Search Results</h2></td>\n";
                Severity: Minor
                Found in lib/m2html/templates/brain/doxysearch.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 combine_results has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                function combine_results($results,&$docs)
                {
                  foreach ($results as $wordInfo)
                  {
                    $docsList = &$wordInfo["docs"];
                Severity: Minor
                Found in lib/m2html/templates/blue/doxysearch.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 report_results has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                function report_results(&$docs)
                {
                  echo "<table cellspacing=\"2\">\n";
                  echo "  <tr>\n";
                  echo "    <td colspan=\"2\"><h2>Search Results</h2></td>\n";
                Severity: Minor
                Found in lib/m2html/templates/frame/doxysearch.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

                Severity
                Category
                Status
                Source
                Language