amtgard/ORK3

View on GitHub
import/import.primary.php

Summary

Maintainability
F
2 wks
Test Coverage

File import.primary.php has 941 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/*******************************************************************************
 * 
 * Import Routine
Severity: Major
Found in import/import.primary.php - About 2 days to fix

    ImportOrk2 has 34 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class ImportOrk2 {
    
        var $adminuser = 'adminimport';
        var $adminpassword = 'e01e44f3';
        
    Severity: Minor
    Found in import/import.primary.php - About 4 hrs to fix

      Function ImportTitles has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          function ImportTitles($number = 5) {
              set_time_limit(600);  
              
              echo "<h2>Import Titles</h2>";
              
      Severity: Minor
      Found in import/import.primary.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 ImportCredits has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          function ImportCredits($number = 5) {
              set_time_limit(600);  
              
              echo "<h2>Import Credits</h2>";
              
      Severity: Minor
      Found in import/import.primary.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 ImportKnights has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          function ImportKnights($number = 5) {
              set_time_limit(600);  
              
              echo "<h2>Import Knights</h2>";
              
      Severity: Minor
      Found in import/import.primary.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

      Method ImportTitles has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function ImportTitles($number = 5) {
              set_time_limit(600);  
              
              echo "<h2>Import Titles</h2>";
              
      Severity: Major
      Found in import/import.primary.php - About 2 hrs to fix

        Method ImportCredits has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function ImportCredits($number = 5) {
                set_time_limit(600);  
                
                echo "<h2>Import Credits</h2>";
                
        Severity: Minor
        Found in import/import.primary.php - About 1 hr to fix

          Function ImportNotes has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

              function ImportNotes() {
              /***************************************************************************
               * Notes
               * -    titles
               * -    positions
          Severity: Minor
          Found in import/import.primary.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 ImportPlayers has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function ImportPlayers($number = 20) {
                  set_time_limit(120);  
                  
                  echo "<h2>Import Players</h2>";
                  
          Severity: Minor
          Found in import/import.primary.php - About 1 hr to fix

            Function ImportSquires has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                function ImportSquires($number = 5) {
                    set_time_limit(600);  
                    
                    echo "<h2>Import Squires</h2>";
                    
            Severity: Minor
            Found in import/import.primary.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 ImportKnightAccomplish has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                function ImportKnightAccomplish($number = 5) {
                    set_time_limit(600);  
                    
                    echo "<h2>Import Knight Accomplishments</h2>";
                    
            Severity: Minor
            Found in import/import.primary.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 ImportGroups has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                function ImportGroups($number = 5) {
                    set_time_limit(600);  
                    
                    echo "<h2>Import Groups</h2>";
                    
            Severity: Minor
            Found in import/import.primary.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 ImportMisc has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                function ImportMisc($number = 5) {
                    set_time_limit(600);  
                    
                    echo "<h2>Import Misc</h2>";
                    
            Severity: Minor
            Found in import/import.primary.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 ImportPositions has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                function ImportPositions($number = 10) {
                    set_time_limit(600);  
                    
                    echo "<h2>Import Positions</h2>";
                    
            Severity: Minor
            Found in import/import.primary.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 ImportKnights has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function ImportKnights($number = 5) {
                    set_time_limit(600);  
                    
                    echo "<h2>Import Knights</h2>";
                    
            Severity: Minor
            Found in import/import.primary.php - About 1 hr to fix

              Method ImportVisitorCredits has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function ImportVisitorCredits($number = 5) {
                      set_time_limit(600);  
                      
                      echo "<h2>Import Visitor Credits</h2>";
                      
              Severity: Minor
              Found in import/import.primary.php - About 1 hr to fix

                Method ImportCompanyMembers has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function ImportCompanyMembers($number = 5) {
                        set_time_limit(120);  
                        
                        echo "<h2>Import Company Members</h2>";
                        
                Severity: Minor
                Found in import/import.primary.php - About 1 hr to fix

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

                      function ImportPrincipalityParks($number = 20) {
                          global $STATES;
                          
                          echo "<h2>Import Principality Parks</h2>";
                          
                  Severity: Minor
                  Found in import/import.primary.php - About 1 hr to fix

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

                        function ImportKingdomParks($number = 20) {
                            global $STATES;
                            
                            echo "<h2>Import Kingdom Parks</h2>";
                            
                    Severity: Minor
                    Found in import/import.primary.php - About 1 hr to fix

                      Method InitializeImport has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function InitializeImport() {
                              if ($this->IsStarted()) {
                                  $this->cache = new Yapo($this->ORK2, 'dbimport_cache');
                                  $this->status = new Yapo($this->ORK2, 'dbimport_status');
                                  return;
                      Severity: Minor
                      Found in import/import.primary.php - About 1 hr to fix

                        Method ImportSquires has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function ImportSquires($number = 5) {
                                set_time_limit(600);  
                                
                                echo "<h2>Import Squires</h2>";
                                
                        Severity: Minor
                        Found in import/import.primary.php - About 1 hr to fix

                          Method ImportMasters has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function ImportMasters($number = 5) {
                                  set_time_limit(600);  
                                  
                                  echo "<h2>Import Masters</h2>";
                                  
                          Severity: Minor
                          Found in import/import.primary.php - About 1 hr to fix

                            Method ImportAwards has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function ImportAwards($number = 5) {
                                    set_time_limit(600);  
                                    
                                    echo "<h2>Import Awards</h2>";
                                    
                            Severity: Minor
                            Found in import/import.primary.php - About 1 hr to fix

                              Method ImportPositions has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function ImportPositions($number = 10) {
                                      set_time_limit(600);  
                                      
                                      echo "<h2>Import Positions</h2>";
                                      
                              Severity: Minor
                              Found in import/import.primary.php - About 1 hr to fix

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

                                    function ImportMisc($number = 5) {
                                        set_time_limit(600);  
                                        
                                        echo "<h2>Import Misc</h2>";
                                        
                                Severity: Minor
                                Found in import/import.primary.php - About 1 hr to fix

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

                                      function ImportCompanyAwards($number = 5) {
                                          set_time_limit(600);  
                                          
                                          echo "<h2>Import Company Awards</h2>";
                                          
                                  Severity: Minor
                                  Found in import/import.primary.php - About 1 hr to fix

                                    Method ImportKnightAccomplish has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function ImportKnightAccomplish($number = 5) {
                                            set_time_limit(600);  
                                            
                                            echo "<h2>Import Knight Accomplishments</h2>";
                                            
                                    Severity: Minor
                                    Found in import/import.primary.php - About 1 hr to fix

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

                                          function ImportCompanyAwards($number = 5) {
                                              set_time_limit(600);  
                                              
                                              echo "<h2>Import Company Awards</h2>";
                                              
                                      Severity: Minor
                                      Found in import/import.primary.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 ImportAwards has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          function ImportAwards($number = 5) {
                                              set_time_limit(600);  
                                              
                                              echo "<h2>Import Awards</h2>";
                                              
                                      Severity: Minor
                                      Found in import/import.primary.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 ImportMasters has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          function ImportMasters($number = 5) {
                                              set_time_limit(600);  
                                              
                                              echo "<h2>Import Masters</h2>";
                                              
                                      Severity: Minor
                                      Found in import/import.primary.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 ImportGroups has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function ImportGroups($number = 5) {
                                              set_time_limit(600);  
                                              
                                              echo "<h2>Import Groups</h2>";
                                              
                                      Severity: Minor
                                      Found in import/import.primary.php - About 1 hr to fix

                                        Function ImportCompanyMembers has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            function ImportCompanyMembers($number = 5) {
                                                set_time_limit(120);  
                                                
                                                echo "<h2>Import Company Members</h2>";
                                                
                                        Severity: Minor
                                        Found in import/import.primary.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 ImportOtherAwards has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            function ImportOtherAwards() {
                                                /*
                                                 * -    companyawards
                                                 * -    knightsbelts
                                                 * -    squires
                                        Severity: Minor
                                        Found in import/import.primary.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 ImportVisitorCredits has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            function ImportVisitorCredits($number = 5) {
                                                set_time_limit(600);  
                                                
                                                echo "<h2>Import Visitor Credits</h2>";
                                                
                                        Severity: Minor
                                        Found in import/import.primary.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 ImportPrincipalities has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function ImportPrincipalities() {
                                                echo "<h2>Import Principalities</h2>";
                                                
                                                list($princip_id, $detail) = $this->LastStatus('princips');
                                        
                                        
                                        Severity: Minor
                                        Found in import/import.primary.php - About 1 hr to fix

                                          Method ImportKingdoms has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              function ImportKingdoms() {
                                                  echo "<h2>Import Kingdoms</h2>";
                                                  
                                                  list($kingdom_id, $detail) = $this->LastStatus('kingdoms', array(14));
                                           
                                          Severity: Minor
                                          Found in import/import.primary.php - About 1 hr to fix

                                            Function ImportPlayers has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                                function ImportPlayers($number = 20) {
                                                    set_time_limit(120);  
                                                    
                                                    echo "<h2>Import Players</h2>";
                                                    
                                            Severity: Minor
                                            Found in import/import.primary.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

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    if ($this->ImportGroups(5000) == 0) {
                                                                        return 0;                        
                                                                    }
                                            Severity: Major
                                            Found in import/import.primary.php - About 45 mins to fix

                                              Method RecordTransfer has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  public function RecordTransfer($ork2_t, $ork3_t, $ork2_id, $ork3_id, $status, $wl = 0) {
                                              Severity: Minor
                                              Found in import/import.primary.php - About 45 mins to fix

                                                Method AddCacheLine has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    function AddCacheLine($ork2_t, $ork3_t, $ork2_id, $ork3_id, $status = null) {
                                                Severity: Minor
                                                Found in import/import.primary.php - About 35 mins to fix

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                      function ImportKnightAccomplish($number = 5) {
                                                          set_time_limit(600);  
                                                          
                                                          echo "<h2>Import Knight Accomplishments</h2>";
                                                          
                                                  Severity: Major
                                                  Found in import/import.primary.php and 1 other location - About 1 day to fix
                                                  import/import.primary.php on lines 74..114

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 317.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                      function ImportGroups($number = 5) {
                                                          set_time_limit(600);  
                                                          
                                                          echo "<h2>Import Groups</h2>";
                                                          
                                                  Severity: Major
                                                  Found in import/import.primary.php and 1 other location - About 1 day to fix
                                                  import/import.primary.php on lines 116..157

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 317.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                         if ($chapters->size() > 0)  do {
                                                              set_time_limit(120);  
                                                              if ($chapters->kingdomID == 2) continue;
                                                              echo "Create Principality Park {$chapters->name}<br />";
                                                              list($tmp, $kingdom_id) = $this->CacheMap('princips', $chapters->principID);
                                                  Severity: Major
                                                  Found in import/import.primary.php and 1 other location - About 1 day to fix
                                                  import/import.primary.php on lines 889..916

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 281.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                          if ($chapters->size() > 0) do {
                                                              set_time_limit(120);  
                                                              if ($chapters->kingdomID == 2) continue;
                                                              echo "Create Kingdom Park {$chapters->name}<br />";
                                                              list($tmp, $kingdom_id) = $this->CacheMap('kingdoms', $chapters->kingdomID);
                                                  Severity: Major
                                                  Found in import/import.primary.php and 1 other location - About 1 day to fix
                                                  import/import.primary.php on lines 843..870

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 281.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  There are no issues that match your filters.

                                                  Category
                                                  Status